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
8fef8ec9
Commit
8fef8ec9
authored
21 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
Better edge swapping for non-recombined extruded meshes
parent
ddccd213
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/3D_Extrude.cpp
+16
-6
16 additions, 6 deletions
Mesh/3D_Extrude.cpp
doc/VERSIONS
+3
-2
3 additions, 2 deletions
doc/VERSIONS
with
19 additions
and
8 deletions
Mesh/3D_Extrude.cpp
+
16
−
6
View file @
8fef8ec9
// $Id: 3D_Extrude.cpp,v 1.
69
2003-12-
04 19:53:41
geuzaine Exp $
// $Id: 3D_Extrude.cpp,v 1.
70
2003-12-
16 17:36:56
geuzaine Exp $
//
// Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -32,6 +32,7 @@ extern Mesh *THEM;
static
int
DIM
,
NUM
;
// current dimension of parent entity
static
int
TEST_IS_ALL_OK
;
static
double
RANDOM_SWAP_FACT
=
0.0
;
static
Tree_T
*
Tree_Ares
=
NULL
,
*
Tree_Swaps
=
NULL
;
static
Curve
*
THEC
=
NULL
;
static
Surface
*
THES
=
NULL
;
...
...
@@ -516,7 +517,10 @@ void Extrude_Simplex_Phase2(void *data, void *dum)
List_Read
(
L1
,
k
+
1
,
&
v5
);
List_Read
(
L2
,
k
+
1
,
&
v6
);
k
++
;
//if((double)rand()/(double)RAND_MAX < 0.1) break;
if
(
RANDOM_SWAP_FACT
){
if
((
double
)
rand
()
/
(
double
)
RAND_MAX
<
RANDOM_SWAP_FACT
)
break
;
}
if
(
are_exist
(
v4
,
v2
,
Tree_Ares
)
&&
are_exist
(
v5
,
v3
,
Tree_Ares
)
&&
are_exist
(
v1
,
v6
,
Tree_Ares
))
{
...
...
@@ -1069,6 +1073,7 @@ int Extrude_Mesh(Tree_T * Volumes)
}
j
=
0
;
RANDOM_SWAP_FACT
=
0.0
;
do
{
TEST_IS_ALL_OK
=
0
;
for
(
int
ivol
=
0
;
ivol
<
List_Nbr
(
vol
);
ivol
++
)
{
...
...
@@ -1083,10 +1088,15 @@ int Extrude_Mesh(Tree_T * Volumes)
}
}
Msg
(
STATUS3
,
"Swapping %d"
,
TEST_IS_ALL_OK
);
if
(
TEST_IS_ALL_OK
==
j
)
{
if
(
j
)
Msg
(
GERROR
,
"Unable to swap all edges (output mesh will be incorrect): use 'Recombine'"
);
break
;
if
(
TEST_IS_ALL_OK
==
j
&&
j
!=
0
)
{
if
(
RANDOM_SWAP_FACT
>
0.8
){
Msg
(
GERROR
,
"Unable to swap all edges (output mesh will be incorrect): use 'Recombine'"
);
break
;
}
else
{
RANDOM_SWAP_FACT
+=
0.1
;
Msg
(
INFO
,
"Setting random swapping factor to %g"
,
RANDOM_SWAP_FACT
);
}
}
j
=
TEST_IS_ALL_OK
;
}
while
(
TEST_IS_ALL_OK
);
...
...
This diff is collapsed.
Click to expand it.
doc/VERSIONS
+
3
−
2
View file @
8fef8ec9
$Id: VERSIONS,v 1.17
7
2003-12-
07 05:37:00
geuzaine Exp $
$Id: VERSIONS,v 1.17
8
2003-12-
16 17:36:56
geuzaine Exp $
New in 1.51: initial support for visualizing mesh partitions;
integrated version 2.0 of the MSH mesh file format;
integrated version 2.0 of the MSH mesh file format; better edge
swapping for non-recombined extruded meshes;
New in 1.50: small changes to the visibility browser + made visibility
scriptable (new Show/Hide commands); fixed (rare) crash when deleting
...
...
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