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
Analyze
Contributor 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
gmsh
gmsh
Commits
517cacfa
Commit
517cacfa
authored
15 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
add note explaining last bits to change to make meshers thread-safe
parent
a41700f5
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
Mesh/Generator.cpp
+15
-2
15 additions, 2 deletions
Mesh/Generator.cpp
Mesh/meshGFace.cpp
+5
-0
5 additions, 0 deletions
Mesh/meshGFace.cpp
with
20 additions
and
2 deletions
Mesh/Generator.cpp
+
15
−
2
View file @
517cacfa
...
...
@@ -403,18 +403,31 @@ static void Mesh2D(GModel *m)
double
t1
=
Cpu
();
// skip short mesh edges
geomTresholdVertexEquivalence
inst
(
m
);
geomTresholdVertexEquivalence
inst
(
m
);
// boundary layers are special: their generation (including vertices
// and curve meshes) is global as it depends on a smooth normal
// field generated from the surface mesh of the source surfaces
if
(
!
Mesh2DWithBoundaryLayers
(
m
)){
#if 1
std
::
for_each
(
m
->
firstFace
(),
m
->
lastFace
(),
meshGFace
());
#else
// test openmp
std
::
vector
<
GFace
*>
faces
;
faces
.
insert
(
faces
.
begin
(),
m
->
firstFace
(),
m
->
lastFace
());
#pragma omp parallel for schedule(dynamic)
for
(
unsigned
int
i
=
0
;
i
<
faces
.
size
();
i
++
){
meshGFace
mesher
;
mesher
(
faces
[
i
]);
}
#endif
int
nIter
=
0
;
while
(
1
){
meshGFace
mesher
;
int
nbPending
=
0
;
for
(
GModel
::
fiter
it
=
m
->
firstFace
()
;
it
!=
m
->
lastFace
();
++
it
){
for
(
GModel
::
fiter
it
=
m
->
firstFace
();
it
!=
m
->
lastFace
();
++
it
){
if
((
*
it
)
->
meshStatistics
.
status
==
GFace
::
PENDING
){
mesher
(
*
it
);
nbPending
++
;
...
...
This diff is collapsed.
Click to expand it.
Mesh/meshGFace.cpp
+
5
−
0
View file @
517cacfa
...
...
@@ -368,6 +368,11 @@ static bool recover_medge_old(BDS_Mesh *m, GEdge *ge, std::set<EdgeToRecover> *e
// Builds An initial triangular mesh that respects the boundaries of
// the domain, including embedded points and surfaces
// FIXME: to make the algorithm thread-safe, we need to change the way
// we renumber the boundary vertices (and the associated u/v reparam):
// using setIndex leads to unpredicatbel results if meshing
// concurrently two surfaces that share a common edge!
static
bool
gmsh2DMeshGenerator
(
GFace
*
gf
,
int
RECUR_ITER
,
bool
repairSelfIntersecting1dMesh
,
bool
debug
=
true
)
{
...
...
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