Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
5c9325ce
Commit
5c9325ce
authored
10 years ago
by
Thomas Toulorge
Browse files
Options
Downloads
Patches
Plain Diff
Removed pass on Jacobian in MeshQualityOptimizer unless explicitly required
parent
3619b8d5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
contrib/MeshQualityOptimizer/MeshQualityOptimizer.cpp
+22
-15
22 additions, 15 deletions
contrib/MeshQualityOptimizer/MeshQualityOptimizer.cpp
contrib/MeshQualityOptimizer/MeshQualityOptimizer.h
+19
-19
19 additions, 19 deletions
contrib/MeshQualityOptimizer/MeshQualityOptimizer.h
with
41 additions
and
34 deletions
contrib/MeshQualityOptimizer/MeshQualityOptimizer.cpp
+
22
−
15
View file @
5c9325ce
...
@@ -106,24 +106,31 @@ void MeshQualityOptimizer(GModel *gm, MeshQualOptParameters &p)
...
@@ -106,24 +106,31 @@ void MeshQualityOptimizer(GModel *gm, MeshQualOptParameters &p)
minInvCondNumBarFunc
.
setTarget
(
p
.
minTargetInvCondNum
,
1.
);
minInvCondNumBarFunc
.
setTarget
(
p
.
minTargetInvCondNum
,
1.
);
MeshOptPass
minJacPass
;
MeshOptPass
minJacPass
;
minJacPass
.
barrierIterMax
=
p
.
optPassMax
;
minJacPass
.
optIterMax
=
p
.
itMax
;
minJacPass
.
contrib
.
push_back
(
&
nodeDistFunc
);
minJacPass
.
contrib
.
push_back
(
&
minIdealJacBarFunc
);
par
.
pass
.
push_back
(
minJacPass
);
MeshOptPass
minInvCondNumPass
;
MeshOptPass
minInvCondNumPass
;
minInvCondNumPass
.
barrierIterMax
=
p
.
optPassMax
;
if
(
p
.
onlyValidity
)
{
minInvCondNumPass
.
optIterMax
=
p
.
itMax
;
minJacPass
.
barrierIterMax
=
p
.
optPassMax
;
minInvCondNumPass
.
contrib
.
push_back
(
&
nodeDistFunc
);
minJacPass
.
optIterMax
=
p
.
itMax
;
minInvCondNumPass
.
contrib
.
push_back
(
&
minInvCondNumBarFunc
);
minJacPass
.
contrib
.
push_back
(
&
nodeDistFunc
);
par
.
pass
.
push_back
(
minInvCondNumPass
);
minJacPass
.
contrib
.
push_back
(
&
minIdealJacBarFunc
);
par
.
pass
.
push_back
(
minJacPass
);
}
else
{
minInvCondNumPass
.
barrierIterMax
=
p
.
optPassMax
;
minInvCondNumPass
.
optIterMax
=
p
.
itMax
;
minInvCondNumPass
.
contrib
.
push_back
(
&
nodeDistFunc
);
minInvCondNumPass
.
contrib
.
push_back
(
&
minInvCondNumBarFunc
);
par
.
pass
.
push_back
(
minInvCondNumPass
);
}
meshOptimizer
(
gm
,
par
);
meshOptimizer
(
gm
,
par
);
p
.
CPU
=
par
.
CPU
;
p
.
CPU
=
par
.
CPU
;
// p.minIdealJac = minIdealJacBarFunc.getMin();
if
(
p
.
onlyValidity
)
{
// p.maxIdealJac = minIdealJacBarFunc.getMax();
p
.
minIdealJac
=
minIdealJacBarFunc
.
getMin
();
p
.
minInvCondNum
=
minInvCondNumBarFunc
.
getMin
();
p
.
maxIdealJac
=
minIdealJacBarFunc
.
getMax
();
p
.
maxInvCondNum
=
minInvCondNumBarFunc
.
getMax
();
}
else
{
p
.
minInvCondNum
=
minInvCondNumBarFunc
.
getMin
();
p
.
maxInvCondNum
=
minInvCondNumBarFunc
.
getMax
();
}
}
}
This diff is collapsed.
Click to expand it.
contrib/MeshQualityOptimizer/MeshQualityOptimizer.h
+
19
−
19
View file @
5c9325ce
...
@@ -33,38 +33,38 @@
...
@@ -33,38 +33,38 @@
class
GModel
;
class
GModel
;
struct
MeshQualOptParameters
{
struct
MeshQualOptParameters
{
bool
onlyValidity
;
bool
excludeQuad
,
excludeHex
,
excludePrism
;
bool
excludeQuad
,
excludeHex
,
excludePrism
;
double
minTargetIdealJac
;
double
minTargetIdealJac
;
double
minTargetInvCondNum
;
double
minTargetInvCondNum
;
double
weightFixed
;
// weight of the energy for fixed nodes
double
weightFixed
;
// weight of the energy for fixed nodes
double
weightFree
;
// weight of the energy for free nodes
double
weightFree
;
// weight of the energy for free nodes
int
nbLayers
;
// number of layers taken around a bad element
int
nbLayers
;
// number of layers taken around a bad element
int
dim
;
// which dimension to optimize
int
dim
;
// which dimension to optimize
int
itMax
;
// max number of iterations in the optimization process
int
itMax
;
// max number of iterations in the optimization process
int
optPassMax
;
// max number of optimization passes
int
optPassMax
;
// max number of optimization passes
bool
onlyVisible
;
// apply optimization to visible entities ONLY
bool
onlyVisible
;
// apply optimization to visible entities ONLY
double
distanceFactor
;
// filter elements such that no elements further away
double
distanceFactor
;
// Distance criterion for patch creation
// than DistanceFactor times the max distance to
bool
fixBndNodes
;
// If points can move on boundaries
// straight sided version of an element are optimized
int
strategy
;
// 0 = connected blobs, 1 = adaptive one-by-one
bool
fixBndNodes
;
// how jacobians are computed and if points can move on boundaries
int
maxAdaptBlob
;
// Max. nb. of blob adaptation interations (if adaptive)
int
strategy
;
// 0 = connected blobs, 1 = adaptive one-by-one
int
adaptBlobLayerFact
;
// Growth factor in number of layers for blob adaptation (if adaptive)
int
maxAdaptBlob
;
// Max. nb. of blob adaptation interations
double
adaptBlobDistFact
;
// Growth factor in distance factor for blob adaptation (if adaptive)
int
adaptBlobLayerFact
;
// Growth factor in number of layers for blob adaptation
double
adaptBlobDistFact
;
// Growth factor in distance factor for blob adaptation
int
SUCCESS
;
// 0 --> success , 1 --> Not converged
int
SUCCESS
;
// 0 --> success , 1 --> Not converged
//
double minIdealJac, maxIdealJac; // after optimization, range of jacobians
double
minIdealJac
,
maxIdealJac
;
// after optimization, range of jacobians
double
minInvCondNum
,
maxInvCondNum
;
// after optimization, range of jacobians
double
minInvCondNum
,
maxInvCondNum
;
// after optimization, range of jacobians
double
CPU
;
// Time for optimization
double
CPU
;
// Time for optimization
MeshQualOptParameters
()
MeshQualOptParameters
()
:
excludeQuad
(
false
),
excludeHex
(
false
),
excludePrism
(
false
),
:
onlyValidity
(
false
),
excludeQuad
(
false
),
excludeHex
(
false
),
excludePrism
(
false
),
minTargetIdealJac
(
0.1
),
minTargetInvCondNum
(
0.1
),
weightFixed
(
1000.
),
minTargetIdealJac
(
0.1
),
minTargetInvCondNum
(
0.1
),
weightFixed
(
1000.
),
weightFree
(
1.
),
nbLayers
(
6
)
,
dim
(
3
)
,
itMax
(
300
),
optPassMax
(
50
),
weightFree
(
1.
),
nbLayers
(
6
)
,
dim
(
3
)
,
itMax
(
300
),
optPassMax
(
50
),
onlyVisible
(
true
),
distanceFactor
(
12
),
fixBndNodes
(
false
),
strategy
(
0
),
onlyVisible
(
true
),
distanceFactor
(
12
),
fixBndNodes
(
false
),
strategy
(
0
),
maxAdaptBlob
(
3
),
adaptBlobLayerFact
(
2.
),
adaptBlobDistFact
(
2.
),
CPU
(
0.
),
maxAdaptBlob
(
3
),
adaptBlobLayerFact
(
2.
),
adaptBlobDistFact
(
2.
),
CPU
(
0.
),
//
minIdealJac(0.), maxIdealJac(0.),
SUCCESS(-1)
minIdealJac
(
0.
),
maxIdealJac
(
0.
),
minInvCondNum
(
0.
),
maxInvCondNum
(
0.
),
minInvCondNum
(
0.
),
maxInvCondNum
(
0.
),
SUCCESS
(
-
1
)
SUCCESS
(
-
1
)
{
{
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment