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
bec8701a
Commit
bec8701a
authored
8 years ago
by
Amaury Johnen
Browse files
Options
Downloads
Patches
Plain Diff
fix bugs
parent
474f53e8
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Mesh/Generator.cpp
+1
-1
1 addition, 1 deletion
Mesh/Generator.cpp
Mesh/qualityMeasuresJacobian.cpp
+62
-9
62 additions, 9 deletions
Mesh/qualityMeasuresJacobian.cpp
Mesh/qualityMeasuresJacobian.h
+2
-2
2 additions, 2 deletions
Mesh/qualityMeasuresJacobian.h
with
65 additions
and
12 deletions
Mesh/Generator.cpp
+
1
−
1
View file @
bec8701a
...
...
@@ -144,7 +144,7 @@ static void GetQualityMeasure(std::vector<T*> &ele,
if
(
s
>
(
2
*
j
-
100
)
/
100.
&&
s
<=
(
2
*
j
-
98
)
/
100.
)
quality
[
0
][
j
]
++
;
if
(
g
>
j
/
100.
&&
g
<=
(
j
+
1
)
/
100.
)
quality
[
1
][
j
]
++
;
if
(
r
>
j
/
100.
&&
r
<=
(
j
+
1
)
/
100.
)
quality
[
2
][
j
]
++
;
if
(
e
>
(
2
*
j
-
100
)
/
100.
&&
e
<=
(
2
*
j
-
98
)
/
100.
)
quality
[
4
][
j
]
++
;
if
(
e
>
(
2
*
j
-
100
)
/
100.
&&
e
<=
(
2
*
j
-
98
)
/
100.
)
quality
[
3
][
j
]
++
;
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Mesh/qualityMeasuresJacobian.cpp
+
62
−
9
View file @
bec8701a
...
...
@@ -20,7 +20,7 @@ static const double cTri = 2/std::sqrt(3);
static
const
double
cTet
=
std
::
sqrt
(
2
);
static
const
double
cPyr
=
std
::
sqrt
(
2
);
static
void
computeCoeffLengthVectors_
(
const
fullMatrix
<
double
>
&
mat
,
static
inline
void
computeCoeffLengthVectors_
(
const
fullMatrix
<
double
>
&
mat
,
fullMatrix
<
double
>
&
coeff
,
int
type
,
int
numCoeff
=
-
1
)
{
...
...
@@ -106,7 +106,7 @@ static void computeCoeffLengthVectors_(const fullMatrix<double> &mat,
}
}
static
void
computeIGE_
(
const
fullVector
<
double
>
&
det
,
static
inline
void
computeIGE_
(
const
fullVector
<
double
>
&
det
,
const
fullMatrix
<
double
>
&
v
,
fullVector
<
double
>
&
ige
,
int
type
)
...
...
@@ -124,18 +124,21 @@ static void computeIGE_(const fullVector<double> &det,
for
(
int
i
=
0
;
i
<
sz
;
i
++
)
{
ige
(
i
)
=
det
(
i
)
/
v
(
i
,
0
)
/
v
(
i
,
1
)
/
v
(
i
,
2
);
}
break
;
case
TYPE_TRI
:
for
(
int
i
=
0
;
i
<
sz
;
i
++
)
{
ige
(
i
)
=
cTri
*
det
(
i
)
*
(
1
/
v
(
i
,
0
)
/
v
(
i
,
1
)
+
1
/
v
(
i
,
0
)
/
v
(
i
,
2
)
+
1
/
v
(
i
,
1
)
/
v
(
i
,
2
))
/
3
;
}
break
;
case
TYPE_PRI
:
for
(
int
i
=
0
;
i
<
sz
;
i
++
)
{
ige
(
i
)
=
cTri
*
det
(
i
)
*
(
1
/
v
(
i
,
0
)
/
v
(
i
,
1
)
/
v
(
i
,
2
)
+
1
/
v
(
i
,
0
)
/
v
(
i
,
3
)
/
v
(
i
,
2
)
+
1
/
v
(
i
,
1
)
/
v
(
i
,
3
)
/
v
(
i
,
2
))
/
3
;
}
break
;
case
TYPE_TET
:
for
(
int
i
=
0
;
i
<
sz
;
i
++
)
{
ige
(
i
)
=
cTet
*
det
(
i
)
*
(
1
/
v
(
i
,
0
)
/
v
(
i
,
5
)
/
v
(
i
,
1
)
+
...
...
@@ -151,6 +154,7 @@ static void computeIGE_(const fullVector<double> &det,
1
/
v
(
i
,
2
)
/
v
(
i
,
3
)
/
v
(
i
,
4
)
+
1
/
v
(
i
,
2
)
/
v
(
i
,
3
)
/
v
(
i
,
5
))
/
12
;
}
break
;
case
TYPE_PYR
:
for
(
int
i
=
0
;
i
<
sz
;
i
++
)
{
ige
(
i
)
=
cPyr
*
det
(
i
)
*
(
1
/
v
(
i
,
0
)
/
v
(
i
,
1
)
/
v
(
i
,
2
)
+
...
...
@@ -162,7 +166,56 @@ static void computeIGE_(const fullVector<double> &det,
1
/
v
(
i
,
4
)
/
v
(
i
,
5
)
/
v
(
i
,
2
)
+
1
/
v
(
i
,
4
)
/
v
(
i
,
5
)
/
v
(
i
,
3
)
)
/
8
;
}
break
;
}
// for (int i = 0; i < sz; i++) {
// double sJ;
// switch (type) {
// case TYPE_QUA:
// ige(i) = det(i) / v(i, 0) / v(i, 1);
// break;
// case TYPE_HEX:
// ige(i) = det(i) / v(i, 0) / v(i, 1) / v(i, 2);
// break;
// case TYPE_TRI:
// ige(i) = cTri * det(i) * (1 / v(i, 0) / v(i, 1) +
// 1 / v(i, 0) / v(i, 2) +
// 1 / v(i, 1) / v(i, 2)) / 3;
// break;
// case TYPE_TET:
// ige(i) = cTet * det(i) * (1 / v(i, 0) / v(i, 5) / v(i, 1) +
// 1 / v(i, 0) / v(i, 5) / v(i, 2) +
// 1 / v(i, 0) / v(i, 5) / v(i, 3) +
// 1 / v(i, 0) / v(i, 5) / v(i, 4) +
// 1 / v(i, 1) / v(i, 4) / v(i, 0) +
// 1 / v(i, 1) / v(i, 4) / v(i, 2) +
// 1 / v(i, 1) / v(i, 4) / v(i, 3) +
// 1 / v(i, 1) / v(i, 4) / v(i, 5) +
// 1 / v(i, 2) / v(i, 3) / v(i, 0) +
// 1 / v(i, 2) / v(i, 3) / v(i, 1) +
// 1 / v(i, 2) / v(i, 3) / v(i, 4) +
// 1 / v(i, 2) / v(i, 3) / v(i, 5)) / 12;
// break;
// case TYPE_PRI:
// ige(i) = cTri * det(i) * (1 / v(i, 0) / v(i, 1) / v(i, 2) +
// 1 / v(i, 0) / v(i, 3) / v(i, 2) +
// 1 / v(i, 1) / v(i, 3) / v(i, 2)) / 3;
// break;
// case TYPE_PYR:
// ige(i) = cPyr * det(i) * (1 / v(i, 0) / v(i, 1) / v(i, 2) +
// 1 / v(i, 0) / v(i, 1) / v(i, 3) +
// 1 / v(i, 0) / v(i, 1) / v(i, 4) +
// 1 / v(i, 0) / v(i, 1) / v(i, 5) +
// 1 / v(i, 2) / v(i, 3) / v(i, 4) +
// 1 / v(i, 2) / v(i, 3) / v(i, 5) +
// 1 / v(i, 4) / v(i, 5) / v(i, 2) +
// 1 / v(i, 4) / v(i, 5) / v(i, 3)) / 8;
// break;
// default:
// Msg::Error("Unkown type for IGE computation");
// return;
// }
// }
}
namespace
jacobianBasedQuality
{
...
...
@@ -727,7 +780,7 @@ double _CoeffDataIGE::_computeLowerBound() const
}
fullMatrix
<
double
>
v
;
_get
CoeffLengthVectors
(
v
,
fals
e
);
compute
CoeffLengthVectors
_
(
_coeffsJacMat
,
v
,
_typ
e
);
fullVector
<
double
>
prox
[
6
];
for
(
int
i
=
0
;
i
<
v
.
size2
();
++
i
)
{
...
...
This diff is collapsed.
Click to expand it.
Mesh/qualityMeasuresJacobian.h
+
2
−
2
View file @
bec8701a
...
...
@@ -32,7 +32,7 @@ class _CoeffData
protected:
double
_minL
,
_maxL
;
//Extremum of Jac at corners
double
_minB
,
_maxB
;
//Extremum of bezier coefficients
int
_depth
;
const
int
_depth
;
public:
_CoeffData
(
int
depth
)
:
_minL
(
0
),
_maxL
(
0
),
_minB
(
0
),
_maxB
(
0
),
...
...
@@ -78,7 +78,7 @@ private:
const
fullVector
<
double
>
_coeffsJacDet
;
const
fullMatrix
<
double
>
_coeffsJacMat
;
const
bezierBasis
*
_bfsDet
,
*
_bfsMat
;
int
_type
;
const
int
_type
;
public:
_CoeffDataIGE
(
fullVector
<
double
>
&
det
,
...
...
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