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
b582efad
Commit
b582efad
authored
21 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
Previous commit was completely wrong. Need to think a little more about this problem.
parent
5e5ee682
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Mesh/3D_Extrude.cpp
+16
-3
16 additions, 3 deletions
Mesh/3D_Extrude.cpp
with
16 additions
and
3 deletions
Mesh/3D_Extrude.cpp
+
16
−
3
View file @
b582efad
// $Id: 3D_Extrude.cpp,v 1.7
1
2003-12-16 2
0:22:35
geuzaine Exp $
// $Id: 3D_Extrude.cpp,v 1.7
2
2003-12-16 2
2:17:48
geuzaine Exp $
//
//
// Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -32,7 +32,7 @@ extern Mesh *THEM;
...
@@ -32,7 +32,7 @@ extern Mesh *THEM;
static
int
DIM
,
NUM
;
// current dimension of parent entity
static
int
DIM
,
NUM
;
// current dimension of parent entity
static
int
TEST_IS_ALL_OK
;
static
int
TEST_IS_ALL_OK
;
static
double
RANDOM_SWAP_FACT
=
0.0
;
//
static double RANDOM_SWAP_FACT = 0.0;
static
Tree_T
*
Tree_Ares
=
NULL
,
*
Tree_Swaps
=
NULL
;
static
Tree_T
*
Tree_Ares
=
NULL
,
*
Tree_Swaps
=
NULL
;
static
Curve
*
THEC
=
NULL
;
static
Curve
*
THEC
=
NULL
;
static
Surface
*
THES
=
NULL
;
static
Surface
*
THES
=
NULL
;
...
@@ -233,6 +233,13 @@ void are_cree(Vertex * v1, Vertex * v2, Tree_T * t)
...
@@ -233,6 +233,13 @@ void are_cree(Vertex * v1, Vertex * v2, Tree_T * t)
n
.
a
=
IMAX
(
v1
->
Num
,
v2
->
Num
);
n
.
a
=
IMAX
(
v1
->
Num
,
v2
->
Num
);
n
.
b
=
IMIN
(
v1
->
Num
,
v2
->
Num
);
n
.
b
=
IMIN
(
v1
->
Num
,
v2
->
Num
);
Tree_Replace
(
t
,
&
n
);
Tree_Replace
(
t
,
&
n
);
#if 0
if(!comparePosition(&v1, &v2)){
Msg(GERROR, "Created zero-length edge!");
}
#endif
}
}
void
are_del
(
Vertex
*
v1
,
Vertex
*
v2
,
Tree_T
*
t
)
void
are_del
(
Vertex
*
v1
,
Vertex
*
v2
,
Tree_T
*
t
)
...
@@ -517,10 +524,12 @@ void Extrude_Simplex_Phase2(void *data, void *dum)
...
@@ -517,10 +524,12 @@ void Extrude_Simplex_Phase2(void *data, void *dum)
List_Read
(
L1
,
k
+
1
,
&
v5
);
List_Read
(
L1
,
k
+
1
,
&
v5
);
List_Read
(
L2
,
k
+
1
,
&
v6
);
List_Read
(
L2
,
k
+
1
,
&
v6
);
k
++
;
k
++
;
/*
if(RANDOM_SWAP_FACT){
if(RANDOM_SWAP_FACT){
if((double)rand()/(double)RAND_MAX < RANDOM_SWAP_FACT)
if((double)rand()/(double)RAND_MAX < RANDOM_SWAP_FACT)
break;
break;
}
}
*/
if
(
are_exist
(
v4
,
v2
,
Tree_Ares
)
&&
if
(
are_exist
(
v4
,
v2
,
Tree_Ares
)
&&
are_exist
(
v5
,
v3
,
Tree_Ares
)
&&
are_exist
(
v5
,
v3
,
Tree_Ares
)
&&
are_exist
(
v1
,
v6
,
Tree_Ares
))
{
are_exist
(
v1
,
v6
,
Tree_Ares
))
{
...
@@ -1073,7 +1082,7 @@ int Extrude_Mesh(Tree_T * Volumes)
...
@@ -1073,7 +1082,7 @@ int Extrude_Mesh(Tree_T * Volumes)
}
}
j
=
0
;
j
=
0
;
RANDOM_SWAP_FACT
=
0.0
;
//
RANDOM_SWAP_FACT = 0.0;
do
{
do
{
TEST_IS_ALL_OK
=
0
;
TEST_IS_ALL_OK
=
0
;
for
(
int
ivol
=
0
;
ivol
<
List_Nbr
(
vol
);
ivol
++
)
{
for
(
int
ivol
=
0
;
ivol
<
List_Nbr
(
vol
);
ivol
++
)
{
...
@@ -1089,6 +1098,9 @@ int Extrude_Mesh(Tree_T * Volumes)
...
@@ -1089,6 +1098,9 @@ int Extrude_Mesh(Tree_T * Volumes)
}
}
Msg
(
STATUS3
,
"Swapping %d"
,
TEST_IS_ALL_OK
);
Msg
(
STATUS3
,
"Swapping %d"
,
TEST_IS_ALL_OK
);
if
(
TEST_IS_ALL_OK
==
j
&&
j
!=
0
)
{
if
(
TEST_IS_ALL_OK
==
j
&&
j
!=
0
)
{
Msg
(
GERROR
,
"Unable to swap all edges (output mesh will be incorrect): use 'Recombine'"
);
break
;
/*
if(RANDOM_SWAP_FACT > 0.8){
if(RANDOM_SWAP_FACT > 0.8){
Msg(GERROR, "Unable to swap all edges (output mesh will be incorrect): use 'Recombine'");
Msg(GERROR, "Unable to swap all edges (output mesh will be incorrect): use 'Recombine'");
break;
break;
...
@@ -1097,6 +1109,7 @@ int Extrude_Mesh(Tree_T * Volumes)
...
@@ -1097,6 +1109,7 @@ int Extrude_Mesh(Tree_T * Volumes)
RANDOM_SWAP_FACT += 0.05;
RANDOM_SWAP_FACT += 0.05;
Msg(INFO, "Setting random swapping factor to %g", RANDOM_SWAP_FACT);
Msg(INFO, "Setting random swapping factor to %g", RANDOM_SWAP_FACT);
}
}
*/
}
}
j
=
TEST_IS_ALL_OK
;
j
=
TEST_IS_ALL_OK
;
}
while
(
TEST_IS_ALL_OK
);
}
while
(
TEST_IS_ALL_OK
);
...
...
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