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
fd8e8641
Commit
fd8e8641
authored
8 years ago
by
Thomas Toulorge
Browse files
Options
Downloads
Patches
Plain Diff
Fixed compilation problem due to changes not committed.
parent
ebe05746
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Geo/MFace.cpp
+9
-0
9 additions, 0 deletions
Geo/MFace.cpp
Geo/MFace.h
+1
-0
1 addition, 0 deletions
Geo/MFace.h
contrib/HighOrderMeshOptimizer/OptHomFastCurving.cpp
+10
-10
10 additions, 10 deletions
contrib/HighOrderMeshOptimizer/OptHomFastCurving.cpp
with
20 additions
and
10 deletions
Geo/MFace.cpp
+
9
−
0
View file @
fd8e8641
...
@@ -57,6 +57,15 @@ MFace::MFace(std::vector<MVertex*> v)
...
@@ -57,6 +57,15 @@ MFace::MFace(std::vector<MVertex*> v)
sortVertices
(
_v
,
_si
);
sortVertices
(
_v
,
_si
);
}
}
double
MFace
::
approximateArea
()
const
{
SPoint3
p0
=
_v
[
0
]
->
point
(),
p1
=
_v
[
1
]
->
point
(),
p2
=
_v
[
2
]
->
point
();
double
a
=
triangle_area
(
p0
,
p1
,
p2
);
if
(
_v
.
size
()
==
3
)
return
a
;
a
+=
triangle_area
(
p0
,
p2
,
_v
[
3
]
->
point
());
return
a
;
}
SVector3
MFace
::
normal
()
const
SVector3
MFace
::
normal
()
const
{
{
double
n
[
3
];
double
n
[
3
];
...
...
This diff is collapsed.
Click to expand it.
Geo/MFace.h
+
1
−
0
View file @
fd8e8641
...
@@ -43,6 +43,7 @@ class MFace {
...
@@ -43,6 +43,7 @@ class MFace {
for
(
int
i
=
0
;
i
<
getNumVertices
();
i
++
)
for
(
int
i
=
0
;
i
<
getNumVertices
();
i
++
)
verts
[
i
]
=
getSortedVertex
(
i
);
verts
[
i
]
=
getSortedVertex
(
i
);
}
}
double
approximateArea
()
const
;
SVector3
normal
()
const
;
SVector3
normal
()
const
;
SVector3
tangent
(
int
num
)
const
SVector3
tangent
(
int
num
)
const
{
{
...
...
This diff is collapsed.
Click to expand it.
contrib/HighOrderMeshOptimizer/OptHomFastCurving.cpp
+
10
−
10
View file @
fd8e8641
...
@@ -317,13 +317,13 @@ void getOppositeFacePrism(MElement *el, const MFace &elBaseFace,
...
@@ -317,13 +317,13 @@ void getOppositeFacePrism(MElement *el, const MFace &elBaseFace,
elTopFace
=
MFace
(
topVert
);
elTopFace
=
MFace
(
topVert
);
// Compute min. (side faces) and max. (top face) face areas
// Compute min. (side faces) and max. (top face) face areas
faceSurfMax
=
elTopFace
.
area
();
faceSurfMax
=
elTopFace
.
a
pproximateA
rea
();
MFace
sideFace0
=
el
->
getFace
(
2
);
MFace
sideFace0
=
el
->
getFace
(
2
);
faceSurfMin
=
sideFace0
.
area
();
faceSurfMin
=
sideFace0
.
a
pproximateA
rea
();
MFace
sideFace1
=
el
->
getFace
(
3
);
MFace
sideFace1
=
el
->
getFace
(
3
);
faceSurfMin
=
std
::
min
(
faceSurfMin
,
sideFace1
.
area
());
faceSurfMin
=
std
::
min
(
faceSurfMin
,
sideFace1
.
a
pproximateA
rea
());
MFace
sideFace2
=
el
->
getFace
(
4
);
MFace
sideFace2
=
el
->
getFace
(
4
);
faceSurfMin
=
std
::
min
(
faceSurfMin
,
sideFace2
.
area
());
faceSurfMin
=
std
::
min
(
faceSurfMin
,
sideFace2
.
a
pproximateA
rea
());
}
}
...
@@ -364,15 +364,15 @@ void getOppositeFaceHex(MElement *el, const MFace &elBaseFace, MFace &elTopFace,
...
@@ -364,15 +364,15 @@ void getOppositeFaceHex(MElement *el, const MFace &elBaseFace, MFace &elTopFace,
elTopFace
=
MFace
(
topVert
);
elTopFace
=
MFace
(
topVert
);
// Compute min. (side faces) and max. (top face) face areas
// Compute min. (side faces) and max. (top face) face areas
faceSurfMax
=
elTopFace
.
area
();
faceSurfMax
=
elTopFace
.
a
pproximateA
rea
();
MFace
sideFace0
=
el
->
getFace
(
sideFace
[
0
]);
MFace
sideFace0
=
el
->
getFace
(
sideFace
[
0
]);
faceSurfMin
=
sideFace0
.
area
();
faceSurfMin
=
sideFace0
.
a
pproximateA
rea
();
MFace
sideFace1
=
el
->
getFace
(
sideFace
[
1
]);
MFace
sideFace1
=
el
->
getFace
(
sideFace
[
1
]);
faceSurfMin
=
std
::
min
(
faceSurfMin
,
sideFace1
.
area
());
faceSurfMin
=
std
::
min
(
faceSurfMin
,
sideFace1
.
a
pproximateA
rea
());
MFace
sideFace2
=
el
->
getFace
(
sideFace
[
2
]);
MFace
sideFace2
=
el
->
getFace
(
sideFace
[
2
]);
faceSurfMin
=
std
::
min
(
faceSurfMin
,
sideFace2
.
area
());
faceSurfMin
=
std
::
min
(
faceSurfMin
,
sideFace2
.
a
pproximateA
rea
());
MFace
sideFace3
=
el
->
getFace
(
sideFace
[
3
]);
MFace
sideFace3
=
el
->
getFace
(
sideFace
[
3
]);
faceSurfMin
=
std
::
min
(
faceSurfMin
,
sideFace3
.
area
());
faceSurfMin
=
std
::
min
(
faceSurfMin
,
sideFace3
.
a
pproximateA
rea
());
}
}
...
@@ -392,7 +392,7 @@ void getOppositeFaceTet(MElement *el, const MFace &elBaseFace, MFace &elTopFace,
...
@@ -392,7 +392,7 @@ void getOppositeFaceTet(MElement *el, const MFace &elBaseFace, MFace &elTopFace,
for
(
int
iElFace
=
0
;
iElFace
<
el
->
getNumFaces
();
iElFace
++
)
{
for
(
int
iElFace
=
0
;
iElFace
<
el
->
getNumFaces
();
iElFace
++
)
{
if
(
iElFace
!=
iElBaseFace
)
{
if
(
iElFace
!=
iElBaseFace
)
{
MFace
faceTest
=
el
->
getFace
(
iElFace
);
MFace
faceTest
=
el
->
getFace
(
iElFace
);
const
double
faceSurfTest
=
faceTest
.
area
();
const
double
faceSurfTest
=
faceTest
.
a
pproximateA
rea
();
if
(
faceSurfTest
<
faceSurfMin
)
faceSurfMin
=
faceSurfTest
;
if
(
faceSurfTest
<
faceSurfMin
)
faceSurfMin
=
faceSurfTest
;
if
(
faceSurfTest
>
faceSurfMax
)
{
if
(
faceSurfTest
>
faceSurfMax
)
{
faceSurfMax
=
faceSurfTest
;
faceSurfMax
=
faceSurfTest
;
...
...
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