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
Package registry
Model registry
Operate
Terraform modules
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
Romin Tomasetti
gmsh
Commits
dc50e16a
Commit
dc50e16a
authored
8 years ago
by
Amaury Johnen
Browse files
Options
Downloads
Patches
Plain Diff
rename: Scaled Jacobian -> IGE & Isotropy -> ICN
parent
3ed270bc
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Plugin/AnalyseCurvedMesh.cpp
+77
-74
77 additions, 74 deletions
Plugin/AnalyseCurvedMesh.cpp
Plugin/AnalyseCurvedMesh.h
+23
-23
23 additions, 23 deletions
Plugin/AnalyseCurvedMesh.h
with
100 additions
and
97 deletions
Plugin/AnalyseCurvedMesh.cpp
+
77
−
74
View file @
dc50e16a
...
@@ -24,8 +24,8 @@ class bezierBasis;
...
@@ -24,8 +24,8 @@ class bezierBasis;
StringXNumber
CurvedMeshOptions_Number
[]
=
{
StringXNumber
CurvedMeshOptions_Number
[]
=
{
{
GMSH_FULLRC
,
"Jacobian determinant"
,
NULL
,
1
},
{
GMSH_FULLRC
,
"Jacobian determinant"
,
NULL
,
1
},
{
GMSH_FULLRC
,
"
Scaled Jacobian
"
,
NULL
,
0
},
{
GMSH_FULLRC
,
"
IGE measure
"
,
NULL
,
1
},
{
GMSH_FULLRC
,
"I
sotropy
"
,
NULL
,
1
},
{
GMSH_FULLRC
,
"I
CN measure
"
,
NULL
,
1
},
{
GMSH_FULLRC
,
"Hidding threshold"
,
NULL
,
9
},
{
GMSH_FULLRC
,
"Hidding threshold"
,
NULL
,
9
},
{
GMSH_FULLRC
,
"Draw PView"
,
NULL
,
0
},
{
GMSH_FULLRC
,
"Draw PView"
,
NULL
,
0
},
{
GMSH_FULLRC
,
"Recompute"
,
NULL
,
0
},
{
GMSH_FULLRC
,
"Recompute"
,
NULL
,
0
},
...
@@ -54,36 +54,39 @@ std::string GMSH_AnalyseCurvedMeshPlugin::getHelp() const
...
@@ -54,36 +54,39 @@ std::string GMSH_AnalyseCurvedMeshPlugin::getHelp() const
{
{
return
"Plugin(AnalyseCurvedMesh) analyse all elements of a given dimension. "
return
"Plugin(AnalyseCurvedMesh) analyse all elements of a given dimension. "
"According to what is asked, it computes the minimum of the Jacobian "
"According to what is asked, it computes the minimum of the Jacobian "
"determinant (J), of the scaled Jacobian and/or of the isotropy measure. "
"determinant (J), the IGE quality measure (Inverse Gradient Error) and/or "
"Statistics are printed and if asked a Pview is created for each measure. "
"the ICN quality measure (Inverse Condition Number). "
"Statistics are printed and, if asked, a Pview is created for each measure. "
"The plugin hides elements for which the measure mu > 'Hidding threshold', "
"The plugin hides elements for which the measure mu > 'Hidding threshold', "
"where mu is the
isotropy
measure if asked otherwise the
scaled Jacobian
if "
"where mu is the
ICN
measure if asked otherwise the
IGE measure
if "
"asked otherwise the Jacobian determinant.
\n
"
"asked otherwise the Jacobian determinant.
\n
"
"
\n
"
"
\n
"
"J is faster to compute but gives informations only on validity while the "
"J is faster to compute but gives information only on validity while the "
"other measure gives also informations on quality.
\n
"
"other measure gives also information on quality.
\n
"
"Warning: the scaled Jacobian is experimental for triangles, tetrahedra, "
"The IGE measure is related to the error on the gradient of the finite "
"prisms and pyramids. Computation may take a lot of time for those "
"element solution. It is the scaled Jacobian for quads and hexes and a new "
"elements!
\n
"
"measure for triangles and tetrahedra.
\n
"
"The ICN measure is related to the condition number of the stiffness matrix.
\n
"
"(See article
\"
Efficient computation of the minimum of shape quality "
"measures on curvilinear finite elements
\"
for details.)
\n
"
"
\n
"
"
\n
"
"Parameters:
\n
"
"Parameters:
\n
"
"
\n
"
"
\n
"
"- Jacobian determinant = {0, 1}
\n
"
"- Jacobian determinant = {0, 1}
\n
"
"-
Scaled Jacobian
= {0, 1}
\n
"
"-
IGE measure
= {0, 1}
\n
"
"- I
sotropy
= {0, 1}
\n
"
"- I
CN measure
= {0, 1}
\n
"
"
\n
"
"
\n
"
"- Hidding threshold = [0, 1]:
Does nothing if Isotropy == 0 and Scaled
"
"- Hidding threshold = [0, 1]:
Hides all element for which min(mu) is
"
"
Jacobian == 0. Otherwise, hides all element for which min(mu) is
"
"
strictly greater than the threshold, where mu is the ICN if ICN measure == 1,
"
"
strictly greater than the threshold, where mu is the isotropy if Isotropy
"
"
otherwise mu is the IGE it IGE measure == 1,
"
"
== 1,
otherwise
it
is the
Scaled
Jacobian
. If threshold == 1, no effect,
"
"otherwise
mu
is the Jacobian
determinant.
\n
"
"
i
f == 0 hide all elements except invalid.
\n
"
"
I
f
threshold
== 0
,
hide
s
all elements except invalid.
\n
"
"
\n
"
"
\n
"
"- Draw PView = {0, 1}: Creates a PView of min(J)/max(J), min(
scaled Jac
) "
"- Draw PView = {0, 1}: Creates a PView of min(J)/max(J), min(
IGE
) "
"and/or min(
isotropy
) according to what is asked. If 'Recompute' = 1,
a
"
"and/or min(
ICN
) according to what is asked. If 'Recompute' = 1, "
"new PView
i
s re
draw
ed.
\n
"
"new PViews
a
re
creat
ed.
\n
"
"
\n
"
"
\n
"
"- Recompute = {0,1}: If the mesh has changed, set to 1 to recompute the "
"- Recompute = {0,1}: Should be 1 if the mesh has changed.
\n
"
"bounds.
\n
"
"
\n
"
"
\n
"
"- Dimension = {-1, 1, 2, 3, 4}: If == -1, analyse element of the greater "
"- Dimension = {-1, 1, 2, 3, 4}: If == -1, analyse element of the greater "
"dimension. If == 4, analyse 2D and 3D elements."
;
"dimension. If == 4, analyse 2D and 3D elements."
;
...
@@ -93,8 +96,8 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
...
@@ -93,8 +96,8 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
{
{
_m
=
GModel
::
current
();
_m
=
GModel
::
current
();
bool
computeJac
=
static_cast
<
int
>
(
CurvedMeshOptions_Number
[
0
].
def
);
bool
computeJac
=
static_cast
<
int
>
(
CurvedMeshOptions_Number
[
0
].
def
);
bool
compute
ScaledJac
=
static_cast
<
int
>
(
CurvedMeshOptions_Number
[
1
].
def
);
bool
compute
IGE
=
static_cast
<
int
>
(
CurvedMeshOptions_Number
[
1
].
def
);
bool
computeI
sotropy
=
static_cast
<
int
>
(
CurvedMeshOptions_Number
[
2
].
def
);
bool
computeI
CN
=
static_cast
<
int
>
(
CurvedMeshOptions_Number
[
2
].
def
);
_threshold
=
static_cast
<
double
>
(
CurvedMeshOptions_Number
[
3
].
def
);
_threshold
=
static_cast
<
double
>
(
CurvedMeshOptions_Number
[
3
].
def
);
bool
drawPView
=
static_cast
<
int
>
(
CurvedMeshOptions_Number
[
4
].
def
);
bool
drawPView
=
static_cast
<
int
>
(
CurvedMeshOptions_Number
[
4
].
def
);
bool
recompute
=
static_cast
<
bool
>
(
CurvedMeshOptions_Number
[
5
].
def
);
bool
recompute
=
static_cast
<
bool
>
(
CurvedMeshOptions_Number
[
5
].
def
);
...
@@ -105,20 +108,20 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
...
@@ -105,20 +108,20 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
if
(
recompute
)
{
if
(
recompute
)
{
_data
.
clear
();
_data
.
clear
();
if
(
askedDim
<
4
)
{
if
(
askedDim
<
4
)
{
_computedJ
[
askedDim
-
1
]
=
false
;
_computedJ
ac
[
askedDim
-
1
]
=
false
;
_computed
S
[
askedDim
-
1
]
=
false
;
_computed
IGE
[
askedDim
-
1
]
=
false
;
_computedI
[
askedDim
-
1
]
=
false
;
_computedI
CN
[
askedDim
-
1
]
=
false
;
_PViewJ
[
askedDim
-
1
]
=
false
;
_PViewJ
ac
[
askedDim
-
1
]
=
false
;
_PView
S
[
askedDim
-
1
]
=
false
;
_PView
IGE
[
askedDim
-
1
]
=
false
;
_PViewI
[
askedDim
-
1
]
=
false
;
_PViewI
CN
[
askedDim
-
1
]
=
false
;
}
}
else
{
else
{
_computedJ
[
1
]
=
_computedJ
[
2
]
=
false
;
_computedJ
ac
[
1
]
=
_computedJ
ac
[
2
]
=
false
;
_computed
S
[
1
]
=
_computed
S
[
2
]
=
false
;
_computed
IGE
[
1
]
=
_computed
IGE
[
2
]
=
false
;
_computedI
[
1
]
=
_computedI
[
2
]
=
false
;
_computedI
CN
[
1
]
=
_computedI
CN
[
2
]
=
false
;
_PViewJ
[
1
]
=
_PViewJ
[
2
]
=
false
;
_PViewJ
ac
[
1
]
=
_PViewJ
ac
[
2
]
=
false
;
_PView
S
[
1
]
=
_PView
S
[
2
]
=
false
;
_PView
IGE
[
1
]
=
_PView
IGE
[
2
]
=
false
;
_PViewI
[
1
]
=
_PViewI
[
2
]
=
false
;
_PViewI
CN
[
1
]
=
_PViewI
CN
[
2
]
=
false
;
}
}
}
}
...
@@ -128,7 +131,7 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
...
@@ -128,7 +131,7 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
bool
printStatI
=
false
;
bool
printStatI
=
false
;
for
(
int
dim
=
1
;
dim
<=
3
&&
dim
<=
_m
->
getDim
();
++
dim
)
{
for
(
int
dim
=
1
;
dim
<=
3
&&
dim
<=
_m
->
getDim
();
++
dim
)
{
if
((
askedDim
==
4
&&
dim
>
1
)
||
dim
==
askedDim
)
{
if
((
askedDim
==
4
&&
dim
>
1
)
||
dim
==
askedDim
)
{
if
(
!
_computedJ
[
dim
-
1
])
{
if
(
!
_computedJ
ac
[
dim
-
1
])
{
double
time
=
Cpu
();
double
time
=
Cpu
();
Msg
::
StatusBar
(
true
,
"Computing Jacobian for %dD elements..."
,
dim
);
Msg
::
StatusBar
(
true
,
"Computing Jacobian for %dD elements..."
,
dim
);
_computeMinMaxJandValidity
(
dim
);
_computeMinMaxJandValidity
(
dim
);
...
@@ -136,34 +139,34 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
...
@@ -136,34 +139,34 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
dim
,
Cpu
()
-
time
);
dim
,
Cpu
()
-
time
);
printStatJ
=
true
;
printStatJ
=
true
;
}
}
if
(
compute
ScaledJac
&&
!
_computed
S
[
dim
-
1
])
{
if
(
compute
IGE
&&
!
_computed
IGE
[
dim
-
1
])
{
double
time
=
Cpu
();
double
time
=
Cpu
();
Msg
::
StatusBar
(
true
,
"Computing
scaled Jacobian
for %dD elements..."
,
dim
);
Msg
::
StatusBar
(
true
,
"Computing
IGE
for %dD elements..."
,
dim
);
_computeMin
ScaledJac
(
dim
);
_computeMin
IGE
(
dim
);
Msg
::
StatusBar
(
true
,
"Done computing
scaled Jacobian
for %dD elements (%g s)"
,
Msg
::
StatusBar
(
true
,
"Done computing
IGE
for %dD elements (%g s)"
,
dim
,
Cpu
()
-
time
);
dim
,
Cpu
()
-
time
);
printStatS
=
true
;
printStatS
=
true
;
}
}
if
(
computeI
sotropy
&&
!
_computedI
[
dim
-
1
])
{
if
(
computeI
CN
&&
!
_computedI
CN
[
dim
-
1
])
{
double
time
=
Cpu
();
double
time
=
Cpu
();
Msg
::
StatusBar
(
true
,
"Computing
isotropy
for %dD elements..."
,
dim
);
Msg
::
StatusBar
(
true
,
"Computing
ICN
for %dD elements..."
,
dim
);
_computeMinI
sotropy
(
dim
);
_computeMinI
CN
(
dim
);
Msg
::
StatusBar
(
true
,
"Done computing
isotropy
for %dD elements (%g s)"
,
Msg
::
StatusBar
(
true
,
"Done computing
ICN
for %dD elements (%g s)"
,
dim
,
Cpu
()
-
time
);
dim
,
Cpu
()
-
time
);
printStatI
=
true
;
printStatI
=
true
;
}
}
}
}
}
}
if
(
printStatJ
)
_printStatJacobian
();
if
(
printStatJ
)
_printStatJacobian
();
if
(
printStatS
)
_printStat
ScaledJac
();
if
(
printStatS
)
_printStat
IGE
();
if
(
printStatI
)
_printStatI
sotropy
();
if
(
printStatI
)
_printStatI
CN
();
// Create PView
// Create PView
if
(
drawPView
)
if
(
drawPView
)
for
(
int
dim
=
1
;
dim
<=
3
;
++
dim
)
{
for
(
int
dim
=
1
;
dim
<=
3
;
++
dim
)
{
if
((
askedDim
==
4
&&
dim
>
1
)
||
dim
==
askedDim
)
{
if
((
askedDim
==
4
&&
dim
>
1
)
||
dim
==
askedDim
)
{
if
(
!
_PViewJ
[
dim
-
1
]
&&
computeJac
)
{
if
(
!
_PViewJ
ac
[
dim
-
1
]
&&
computeJac
)
{
_PViewJ
[
dim
-
1
]
=
true
;
_PViewJ
ac
[
dim
-
1
]
=
true
;
std
::
map
<
int
,
std
::
vector
<
double
>
>
dataPV
;
std
::
map
<
int
,
std
::
vector
<
double
>
>
dataPV
;
for
(
unsigned
int
i
=
0
;
i
<
_data
.
size
();
++
i
)
{
for
(
unsigned
int
i
=
0
;
i
<
_data
.
size
();
++
i
)
{
MElement
*
const
el
=
_data
[
i
].
element
();
MElement
*
const
el
=
_data
[
i
].
element
();
...
@@ -176,8 +179,8 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
...
@@ -176,8 +179,8 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
new
PView
(
name
.
str
().
c_str
(),
"ElementData"
,
_m
,
dataPV
);
new
PView
(
name
.
str
().
c_str
(),
"ElementData"
,
_m
,
dataPV
);
}
}
}
}
if
(
!
_PView
S
[
dim
-
1
]
&&
compute
ScaledJac
)
{
if
(
!
_PView
IGE
[
dim
-
1
]
&&
compute
IGE
)
{
_PView
S
[
dim
-
1
]
=
true
;
_PView
IGE
[
dim
-
1
]
=
true
;
std
::
map
<
int
,
std
::
vector
<
double
>
>
dataPV
;
std
::
map
<
int
,
std
::
vector
<
double
>
>
dataPV
;
for
(
unsigned
int
i
=
0
;
i
<
_data
.
size
();
++
i
)
{
for
(
unsigned
int
i
=
0
;
i
<
_data
.
size
();
++
i
)
{
MElement
*
const
el
=
_data
[
i
].
element
();
MElement
*
const
el
=
_data
[
i
].
element
();
...
@@ -186,12 +189,12 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
...
@@ -186,12 +189,12 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
}
}
if
(
dataPV
.
size
())
{
if
(
dataPV
.
size
())
{
std
::
stringstream
name
;
std
::
stringstream
name
;
name
<<
"
Scaled Jacobian
"
<<
dim
<<
"D"
;
name
<<
"
IGE
"
<<
dim
<<
"D"
;
new
PView
(
name
.
str
().
c_str
(),
"ElementData"
,
_m
,
dataPV
);
new
PView
(
name
.
str
().
c_str
(),
"ElementData"
,
_m
,
dataPV
);
}
}
}
}
if
(
!
_PViewI
[
dim
-
1
]
&&
computeI
sotropy
)
{
if
(
!
_PViewI
CN
[
dim
-
1
]
&&
computeI
CN
)
{
_PViewI
[
dim
-
1
]
=
true
;
_PViewI
CN
[
dim
-
1
]
=
true
;
std
::
map
<
int
,
std
::
vector
<
double
>
>
dataPV
;
std
::
map
<
int
,
std
::
vector
<
double
>
>
dataPV
;
for
(
unsigned
int
i
=
0
;
i
<
_data
.
size
();
++
i
)
{
for
(
unsigned
int
i
=
0
;
i
<
_data
.
size
();
++
i
)
{
MElement
*
const
el
=
_data
[
i
].
element
();
MElement
*
const
el
=
_data
[
i
].
element
();
...
@@ -200,7 +203,7 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
...
@@ -200,7 +203,7 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
}
}
if
(
dataPV
.
size
())
{
if
(
dataPV
.
size
())
{
std
::
stringstream
name
;
std
::
stringstream
name
;
name
<<
"I
sotropy
"
<<
dim
<<
"D"
;
name
<<
"I
CN
"
<<
dim
<<
"D"
;
new
PView
(
name
.
str
().
c_str
(),
"ElementData"
,
_m
,
dataPV
);
new
PView
(
name
.
str
().
c_str
(),
"ElementData"
,
_m
,
dataPV
);
}
}
}
}
...
@@ -210,8 +213,8 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
...
@@ -210,8 +213,8 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
// Hide elements
// Hide elements
#if defined(HAVE_OPENGL)
#if defined(HAVE_OPENGL)
_hideWithThreshold
(
askedDim
,
_hideWithThreshold
(
askedDim
,
computeI
sotropy
?
2
:
computeI
CN
?
2
:
compute
ScaledJac
?
1
:
compute
IGE
?
1
:
computeJac
?
0
:
-
1
);
computeJac
?
0
:
-
1
);
CTX
::
instance
()
->
mesh
.
changed
=
(
ENT_ALL
);
CTX
::
instance
()
->
mesh
.
changed
=
(
ENT_ALL
);
drawContext
::
global
()
->
draw
();
drawContext
::
global
()
->
draw
();
...
@@ -222,7 +225,7 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
...
@@ -222,7 +225,7 @@ PView* GMSH_AnalyseCurvedMeshPlugin::execute(PView *v)
void
GMSH_AnalyseCurvedMeshPlugin
::
_computeMinMaxJandValidity
(
int
dim
)
void
GMSH_AnalyseCurvedMeshPlugin
::
_computeMinMaxJandValidity
(
int
dim
)
{
{
if
(
_computedJ
[
dim
-
1
])
return
;
if
(
_computedJ
ac
[
dim
-
1
])
return
;
std
::
set
<
GEntity
*
,
GEntityLessThan
>
entities
;
std
::
set
<
GEntity
*
,
GEntityLessThan
>
entities
;
switch
(
dim
)
{
switch
(
dim
)
{
...
@@ -337,12 +340,12 @@ void GMSH_AnalyseCurvedMeshPlugin::_computeMinMaxJandValidity(int dim)
...
@@ -337,12 +340,12 @@ void GMSH_AnalyseCurvedMeshPlugin::_computeMinMaxJandValidity(int dim)
}
}
delete
normals
;
delete
normals
;
}
}
_computedJ
[
dim
-
1
]
=
true
;
_computedJ
ac
[
dim
-
1
]
=
true
;
}
}
void
GMSH_AnalyseCurvedMeshPlugin
::
_computeMin
ScaledJac
(
int
dim
)
void
GMSH_AnalyseCurvedMeshPlugin
::
_computeMin
IGE
(
int
dim
)
{
{
if
(
_computed
S
[
dim
-
1
])
return
;
if
(
_computed
IGE
[
dim
-
1
])
return
;
MsgProgressStatus
progress
(
_data
.
size
());
MsgProgressStatus
progress
(
_data
.
size
());
...
@@ -358,12 +361,12 @@ void GMSH_AnalyseCurvedMeshPlugin::_computeMinScaledJac(int dim)
...
@@ -358,12 +361,12 @@ void GMSH_AnalyseCurvedMeshPlugin::_computeMinScaledJac(int dim)
progress
.
next
();
progress
.
next
();
}
}
_computed
S
[
dim
-
1
]
=
true
;
_computed
IGE
[
dim
-
1
]
=
true
;
}
}
void
GMSH_AnalyseCurvedMeshPlugin
::
_computeMinI
sotropy
(
int
dim
)
void
GMSH_AnalyseCurvedMeshPlugin
::
_computeMinI
CN
(
int
dim
)
{
{
if
(
_computedI
[
dim
-
1
])
return
;
if
(
_computedI
CN
[
dim
-
1
])
return
;
MsgProgressStatus
progress
(
_data
.
size
());
MsgProgressStatus
progress
(
_data
.
size
());
...
@@ -379,7 +382,7 @@ void GMSH_AnalyseCurvedMeshPlugin::_computeMinIsotropy(int dim)
...
@@ -379,7 +382,7 @@ void GMSH_AnalyseCurvedMeshPlugin::_computeMinIsotropy(int dim)
progress
.
next
();
progress
.
next
();
}
}
_computedI
[
dim
-
1
]
=
true
;
_computedI
CN
[
dim
-
1
]
=
true
;
}
}
int
GMSH_AnalyseCurvedMeshPlugin
::
_hideWithThreshold
(
int
askedDim
,
int
whichMeasure
)
int
GMSH_AnalyseCurvedMeshPlugin
::
_hideWithThreshold
(
int
askedDim
,
int
whichMeasure
)
...
@@ -461,7 +464,7 @@ void GMSH_AnalyseCurvedMeshPlugin::_printStatJacobian()
...
@@ -461,7 +464,7 @@ void GMSH_AnalyseCurvedMeshPlugin::_printStatJacobian()
avgratJc
,
countc
);
avgratJc
,
countc
);
}
}
void
GMSH_AnalyseCurvedMeshPlugin
::
_printStat
ScaledJac
()
void
GMSH_AnalyseCurvedMeshPlugin
::
_printStat
IGE
()
{
{
if
(
_data
.
empty
())
{
if
(
_data
.
empty
())
{
Msg
::
Info
(
"No stat to print."
);
Msg
::
Info
(
"No stat to print."
);
...
@@ -477,11 +480,11 @@ void GMSH_AnalyseCurvedMeshPlugin::_printStatScaledJac()
...
@@ -477,11 +480,11 @@ void GMSH_AnalyseCurvedMeshPlugin::_printStatScaledJac()
}
}
avgminS
/=
_data
.
size
();
avgminS
/=
_data
.
size
();
Msg
::
Info
(
"
Scaled Jacobian
: %6.3f, %6.3f, %6.3f (= worst, avg, best)"
,
Msg
::
Info
(
"
IGE
: %6.3f, %6.3f, %6.3f (= worst, avg, best)"
,
infminS
,
avgminS
,
supminS
);
infminS
,
avgminS
,
supminS
);
}
}
void
GMSH_AnalyseCurvedMeshPlugin
::
_printStatI
sotropy
()
void
GMSH_AnalyseCurvedMeshPlugin
::
_printStatI
CN
()
{
{
if
(
_data
.
empty
())
{
if
(
_data
.
empty
())
{
Msg
::
Info
(
"No stat to print."
);
Msg
::
Info
(
"No stat to print."
);
...
@@ -497,7 +500,7 @@ void GMSH_AnalyseCurvedMeshPlugin::_printStatIsotropy()
...
@@ -497,7 +500,7 @@ void GMSH_AnalyseCurvedMeshPlugin::_printStatIsotropy()
}
}
avgminI
/=
_data
.
size
();
avgminI
/=
_data
.
size
();
Msg
::
Info
(
"I
sotropy
: %6.3f, %6.3f, %6.3f (= worst, avg, best)"
,
Msg
::
Info
(
"I
CN
: %6.3f, %6.3f, %6.3f (= worst, avg, best)"
,
infminI
,
avgminI
,
supminI
);
infminI
,
avgminI
,
supminI
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Plugin/AnalyseCurvedMesh.h
+
23
−
23
View file @
dc50e16a
...
@@ -19,21 +19,21 @@ class data_elementMinMax
...
@@ -19,21 +19,21 @@ class data_elementMinMax
{
{
private:
private:
MElement
*
_el
;
MElement
*
_el
;
double
_minJ
,
_maxJ
,
_min
S
,
_minI
;
double
_minJ
ac
,
_maxJ
ac
,
_min
IGE
,
_minI
CN
;
public:
public:
data_elementMinMax
(
MElement
*
e
,
data_elementMinMax
(
MElement
*
e
,
double
minJ
=
2
,
double
minJ
=
2
,
double
maxJ
=
0
,
double
maxJ
=
0
,
double
min
S
=
-
1
,
double
min
IGE
=
-
1
,
double
minI
=
-
1
)
double
minI
CN
=
-
1
)
:
_el
(
e
),
_minJ
(
minJ
),
_maxJ
(
maxJ
),
_min
S
(
min
S
),
_minI
(
minI
)
{}
:
_el
(
e
),
_minJ
ac
(
minJ
),
_maxJ
ac
(
maxJ
),
_min
IGE
(
min
IGE
),
_minI
CN
(
minI
CN
)
{}
void
setMinS
(
double
r
)
{
_min
S
=
r
;
}
void
setMinS
(
double
r
)
{
_min
IGE
=
r
;
}
void
setMinI
(
double
r
)
{
_minI
=
r
;
}
void
setMinI
(
double
r
)
{
_minI
CN
=
r
;
}
MElement
*
element
()
{
return
_el
;
}
MElement
*
element
()
{
return
_el
;
}
double
minJ
()
{
return
_minJ
;
}
double
minJ
()
{
return
_minJ
ac
;
}
double
maxJ
()
{
return
_maxJ
;
}
double
maxJ
()
{
return
_maxJ
ac
;
}
double
minS
()
{
return
_min
S
;
}
double
minS
()
{
return
_min
IGE
;
}
double
minI
()
{
return
_minI
;
}
double
minI
()
{
return
_minI
CN
;
}
};
};
class
GMSH_AnalyseCurvedMeshPlugin
:
public
GMSH_PostPlugin
class
GMSH_AnalyseCurvedMeshPlugin
:
public
GMSH_PostPlugin
...
@@ -43,8 +43,8 @@ private :
...
@@ -43,8 +43,8 @@ private :
double
_threshold
;
double
_threshold
;
// for 1d, 2d, 3d
// for 1d, 2d, 3d
bool
_computedJ
[
3
],
_computed
S
[
3
],
_computedI
[
3
];
bool
_computedJ
ac
[
3
],
_computed
IGE
[
3
],
_computedI
CN
[
3
];
bool
_PViewJ
[
3
],
_PView
S
[
3
],
_PViewI
[
3
];
bool
_PViewJ
ac
[
3
],
_PView
IGE
[
3
],
_PViewI
CN
[
3
];
std
::
vector
<
data_elementMinMax
>
_data
;
std
::
vector
<
data_elementMinMax
>
_data
;
...
@@ -54,18 +54,18 @@ public :
...
@@ -54,18 +54,18 @@ public :
_m
=
NULL
;
_m
=
NULL
;
_threshold
=
-
1
;
_threshold
=
-
1
;
for
(
int
i
=
0
;
i
<
3
;
++
i
)
{
for
(
int
i
=
0
;
i
<
3
;
++
i
)
{
_computedJ
[
i
]
=
false
;
_computedJ
ac
[
i
]
=
false
;
_computed
S
[
i
]
=
false
;
_computed
IGE
[
i
]
=
false
;
_computedI
[
i
]
=
false
;
_computedI
CN
[
i
]
=
false
;
_PViewJ
[
i
]
=
false
;
_PViewJ
ac
[
i
]
=
false
;
_PView
S
[
i
]
=
false
;
_PView
IGE
[
i
]
=
false
;
_PViewI
[
i
]
=
false
;
_PViewI
CN
[
i
]
=
false
;
}
}
}
}
std
::
string
getName
()
const
{
return
"AnalyseCurvedMesh"
;
}
std
::
string
getName
()
const
{
return
"AnalyseCurvedMesh"
;
}
std
::
string
getShortHelp
()
const
std
::
string
getShortHelp
()
const
{
{
return
"Compute
bounds on Jacobian and metric quality
."
;
return
"Compute
validity and quality of curved elements
."
;
}
}
std
::
string
getHelp
()
const
;
std
::
string
getHelp
()
const
;
std
::
string
getAuthor
()
const
{
return
"Amaury Johnen"
;
}
std
::
string
getAuthor
()
const
{
return
"Amaury Johnen"
;
}
...
@@ -75,12 +75,12 @@ public :
...
@@ -75,12 +75,12 @@ public :
private
:
private
:
void
_computeMinMaxJandValidity
(
int
dim
);
void
_computeMinMaxJandValidity
(
int
dim
);
void
_computeMin
ScaledJac
(
int
dim
);
void
_computeMin
IGE
(
int
dim
);
void
_computeMinI
sotropy
(
int
dim
);
void
_computeMinI
CN
(
int
dim
);
int
_hideWithThreshold
(
int
askedDim
,
int
whichMeasure
);
int
_hideWithThreshold
(
int
askedDim
,
int
whichMeasure
);
void
_printStatJacobian
();
void
_printStatJacobian
();
void
_printStat
ScaledJac
();
void
_printStat
IGE
();
void
_printStatI
sotropy
();
void
_printStatI
CN
();
};
};
#endif
#endif
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