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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Romin Tomasetti
gmsh
Commits
9ba8d0f2
Commit
9ba8d0f2
authored
6 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
https://gitlab.onelab.info/gmsh/gmsh
parents
8df3e5df
637d3643
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
Geo/OCCFace.cpp
+1
-1
1 addition, 1 deletion
Geo/OCCFace.cpp
Mesh/meshGFace.cpp
+47
-11
47 additions, 11 deletions
Mesh/meshGFace.cpp
with
48 additions
and
12 deletions
Geo/OCCFace.cpp
+
1
−
1
View file @
9ba8d0f2
...
...
@@ -256,7 +256,7 @@ GPoint OCCFace::closestPoint(const SPoint3 &qp,
GeomAPI_ProjectPointOnSurf
proj
(
pnt
,
occface
,
umin
,
umax
,
vmin
,
vmax
);
if
(
!
proj
.
NbPoints
())
{
Msg
::
Warnin
g
(
"OCC Project Point on Surface FAIL"
);
Msg
::
Debu
g
(
"OCC Project Point on Surface FAIL"
);
GPoint
gp
(
0
,
0
);
gp
.
setNoSuccess
();
return
gp
;
...
...
This diff is collapsed.
Click to expand it.
Mesh/meshGFace.cpp
+
47
−
11
View file @
9ba8d0f2
...
...
@@ -131,7 +131,7 @@ bool pointInsideParametricDomain(std::vector<SPoint2> &bnd, SPoint2 &p,
void
trueBoundary
(
const
char
*
iii
,
GFace
*
gf
,
std
::
vector
<
SPoint2
>
&
bnd
)
{
//
FILE* view_t = Fopen(iii,"w");
//
/
FILE* view_t = Fopen(iii,"w");
// fprintf(view_t,"View \"True Boundary\"{\n");
std
::
vector
<
GEdge
*>
edg
=
gf
->
edges
();
...
...
@@ -2732,17 +2732,44 @@ void deMeshGFace::operator()(GFace *gf)
gf
->
correspondingVertices
.
clear
();
}
/*
static double TRIANGLE_VALIDITY(MTriangle *t)
static
double
TRIANGLE_VALIDITY
(
GFace
*
gf
,
MTriangle
*
t
)
{
SPoint2
p1
,
p2
,
p3
;
reparamMeshVertexOnFace
(
t
->
getVertex
(
0
),
gf
,
p1
);
reparamMeshVertexOnFace
(
t
->
getVertex
(
1
),
gf
,
p2
);
reparamMeshVertexOnFace
(
t
->
getVertex
(
2
),
gf
,
p3
);
SVector3
N1
=
gf
->
normal
(
p1
);
SVector3
N2
=
gf
->
normal
(
p2
);
SVector3
N3
=
gf
->
normal
(
p3
);
SVector3
N
=
N1
+
N2
+
N3
;
N
.
normalize
();
SVector3
d1
(
t
->
getVertex
(
1
)
->
x
()
-
t
->
getVertex
(
0
)
->
x
(),
t
->
getVertex
(
1
)
->
y
()
-
t
->
getVertex
(
0
)
->
y
(),
t
->
getVertex
(
1
)
->
z
()
-
t
->
getVertex
(
0
)
->
z
());
SVector3
d2
(
t
->
getVertex
(
2
)
->
x
()
-
t
->
getVertex
(
0
)
->
x
(),
t
->
getVertex
(
2
)
->
y
()
-
t
->
getVertex
(
0
)
->
y
(),
t
->
getVertex
(
2
)
->
z
()
-
t
->
getVertex
(
0
)
->
z
());
SVector3
c
=
crossprod
(
d1
,
d2
);
return
dot
(
N
,
c
);
}
static bool isMeshValid (GFace *gf){
static
bool
isMeshValid
(
GFace
*
gf
){
int
invalid
=
0
;
for
(
size_t
i
=
0
;
i
<
gf
->
triangles
.
size
();
i
++
){
double
v
=
TRIANGLE_VALIDITY
(
gf
,
gf
->
triangles
[
i
]);
if
(
v
<
0
)
invalid
++
;
}
if
(
invalid
==
0
||
invalid
==
gf
->
triangles
.
size
())
return
true
;
// printf("%d %d %d\n",gf->tag(),gf->triangles.size(),invalid);
return
false
;
}
*/
// for debugging, change value from -1 to -100;
int
debugSurface
=
-
1
;
//-100;
...
...
@@ -2837,6 +2864,15 @@ void meshGFace::operator()(GFace *gf, bool print)
if
(
gf
->
getNumMeshElements
()
==
0
)
{
Msg
::
Warning
(
"Surface %d consists of no elements"
,
gf
->
tag
());
}
if
(
algoDelaunay2D
(
gf
)
&&
!
isMeshValid
(
gf
)){
Msg
::
Warning
(
"Delaunay based mesher failed on surface %d --> moving to meshadapt"
,
gf
->
tag
());
deMeshGFace
killer
;
killer
(
gf
);
gf
->
setMeshingAlgo
(
1
);
(
*
this
)(
gf
,
print
);
}
}
static
bool
getGFaceNormalFromVert
(
GFace
*
gf
,
MElement
*
el
,
SVector3
&
nf
)
...
...
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