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
8894f67a
Commit
8894f67a
authored
10 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
fix the mess
parent
37e05213
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Mesh/Generator.cpp
+27
-39
27 additions, 39 deletions
Mesh/Generator.cpp
Mesh/pointInsertionRTreeTools.h
+3
-2
3 additions, 2 deletions
Mesh/pointInsertionRTreeTools.h
Mesh/yamakawa.cpp
+864
-845
864 additions, 845 deletions
Mesh/yamakawa.cpp
Mesh/yamakawa.h
+551
-551
551 additions, 551 deletions
Mesh/yamakawa.h
with
1445 additions
and
1437 deletions
Mesh/Generator.cpp
+
27
−
39
View file @
8894f67a
...
@@ -489,85 +489,73 @@ static void Mesh3D(GModel *m)
...
@@ -489,85 +489,73 @@ static void Mesh3D(GModel *m)
FindConnectedRegions
(
delaunay
,
connected
);
FindConnectedRegions
(
delaunay
,
connected
);
// remove quads elements for volumes that are recombined
// remove quads elements for volumes that are recombined
// pragma OMP
ICI
?
?
// pragma OMP
here
?
for
(
unsigned
int
i
=
0
;
i
<
connected
.
size
();
i
++
){
for
(
unsigned
int
i
=
0
;
i
<
connected
.
size
();
i
++
){
for
(
unsigned
j
=
0
;
j
<
connected
[
i
].
size
();
j
++
){
for
(
unsigned
j
=
0
;
j
<
connected
[
i
].
size
();
j
++
){
GRegion
*
gr
=
connected
[
i
][
j
];
GRegion
*
gr
=
connected
[
i
][
j
];
if
(
CTX
::
instance
()
->
mesh
.
recombine3DAll
||
gr
->
meshAttributes
.
recombine3D
){
if
(
CTX
::
instance
()
->
mesh
.
recombine3DAll
||
gr
->
meshAttributes
.
recombine3D
){
std
::
list
<
GFace
*>
f
=
gr
->
faces
();
std
::
list
<
GFace
*>
f
=
gr
->
faces
();
for
(
std
::
list
<
GFace
*>::
iterator
it
=
f
.
begin
();
for
(
std
::
list
<
GFace
*>::
iterator
it
=
f
.
begin
();
it
!=
f
.
end
()
;
++
it
)
it
!=
f
.
end
()
;
++
it
)
quadsToTriangles
(
*
it
,
1000000
);
quadsToTriangles
(
*
it
,
1000000
);
}
}
}
}
}
}
// pragma OMP ICI ??
double
time_recombination
=
0.
,
vol_element_recombination
=
0.
;
double
time_recombination
,
vol_element_recombination
,
vol_hexa_recombination
;
double
vol_hexa_recombination
=
0.
;
int
nb_elements_recombination
,
nb_hexa_recombination
;
int
nb_elements_recombination
=
0
,
nb_hexa_recombination
=
0
;
time_recombination
=
vol_hexa_recombination
=
vol_element_recombination
=
0.
;
nb_elements_recombination
=
nb_hexa_recombination
=
0
;
// pragma OMP here ?
for
(
unsigned
int
i
=
0
;
i
<
connected
.
size
();
i
++
){
for
(
unsigned
int
i
=
0
;
i
<
connected
.
size
();
i
++
){
MeshDelaunayVolume
(
connected
[
i
]);
MeshDelaunayVolume
(
connected
[
i
]);
//
A
dditional code for hex mesh
begin
//
a
dditional code for
experimental
hex mesh
for
(
unsigned
j
=
0
;
j
<
connected
[
i
].
size
();
j
++
){
for
(
unsigned
j
=
0
;
j
<
connected
[
i
].
size
();
j
++
){
GRegion
*
gr
=
connected
[
i
][
j
];
GRegion
*
gr
=
connected
[
i
][
j
];
//R-tree
bool
treat_region_ok
=
false
;
bool
treat_region_ok
=
false
;
if
(
CTX
::
instance
()
->
mesh
.
algo3d
==
ALGO_3D_RTREE
){
if
(
CTX
::
instance
()
->
mesh
.
algo3d
==
ALGO_3D_RTREE
){
// PEB MODIF
if
(
old_algo_hexa
()){
if
(
old_algo_hexa
()){
Filler
f
;
Filler
f
;
f
.
treat_region
(
gr
);
f
.
treat_region
(
gr
);
treat_region_ok
=
true
;
treat_region_ok
=
true
;
}
}
else
{
else
{
Filler3D
f
;
Filler3D
f
;
treat_region_ok
=
f
.
treat_region
(
gr
);
treat_region_ok
=
f
.
treat_region
(
gr
);
}
}
// END PEB MODIF
}
}
//Recombine3D into hex
if
(
treat_region_ok
&&
(
CTX
::
instance
()
->
mesh
.
recombine3DAll
||
if
((
CTX
::
instance
()
->
mesh
.
recombine3DAll
||
gr
->
meshAttributes
.
recombine3D
)
&&
treat_region_ok
){
gr
->
meshAttributes
.
recombine3D
)){
clock_t
a
=
clock
();
double
a
=
Cpu
();
// Recombinator rec;
// rec.execute();
Recombinator
rec
;
Recombinator
rec
;
rec
.
execute
(
gr
);
rec
.
execute
(
gr
);
// Recombinator_Graph rec(1.e7,"test");
// rec.execute(gr);
// Supplementary sup;
// sup.execute();
// PostOp post;
// post.execute(0);
Supplementary
sup
;
Supplementary
sup
;
sup
.
execute
(
gr
);
sup
.
execute
(
gr
);
PostOp
post
;
PostOp
post
;
post
.
execute
(
gr
,
0
);
post
.
execute
(
gr
,
0
);
nb_elements_recombination
+=
post
.
get_nb_elements
();
nb_elements_recombination
+=
post
.
get_nb_elements
();
nb_hexa_recombination
+=
post
.
get_nb_hexahedra
();
nb_hexa_recombination
+=
post
.
get_nb_hexahedra
();
vol_element_recombination
+=
post
.
get_vol_elements
();
vol_element_recombination
+=
post
.
get_vol_elements
();
vol_hexa_recombination
+=
post
.
get_vol_hexahedra
();
vol_hexa_recombination
+=
post
.
get_vol_hexahedra
();
// partial export
// -- partial export
stringstream
ss
;
stringstream
ss
;
ss
<<
"yamakawa_part_"
;
ss
<<
"yamakawa_part_"
;
ss
<<
gr
->
tag
();
ss
<<
gr
->
tag
();
ss
<<
".msh"
;
ss
<<
".msh"
;
export_gregion_mesh
(
gr
,
ss
.
str
().
c_str
());
export_gregion_mesh
(
gr
,
ss
.
str
().
c_str
());
// -- end partial export
time_recombination
+=
(
Cpu
()
-
a
);
time_recombination
+=
(
clock
()
-
a
)
/
(
double
)
CLOCKS_PER_SEC
;
}
}
}
}
}
}
if
(
CTX
::
instance
()
->
mesh
.
recombine3DAll
){
if
(
CTX
::
instance
()
->
mesh
.
recombine3DAll
){
cout
<<
"RECOMBINATION timing:"
<<
endl
;
Msg
::
Info
(
"RECOMBINATION timing:"
);
cout
<<
" ------- CUMULATIVE TIME RECOMBINATION : "
<<
time_recombination
<<
" s."
<<
endl
;
Msg
::
Info
(
" --- CUMULATIVE TIME RECOMBINATION : %g s."
,
time_recombination
);
cout
<<
"RECOMBINATION CUMULATIVE STATISTICS:"
<<
endl
;
Msg
::
Info
(
"RECOMBINATION CUMULATIVE STATISTICS:"
);
cout
<<
"............................ Percentage of hexahedra (#) : "
<<
nb_hexa_recombination
*
100.
/
nb_elements_recombination
<<
endl
;
Msg
::
Info
(
".... Percentage of hexahedra (#) : %g"
,
cout
<<
"............................ Percentage of hexahedra (Vol) : "
<<
vol_hexa_recombination
*
100.
/
vol_element_recombination
<<
endl
;
nb_hexa_recombination
*
100.
/
nb_elements_recombination
);
Msg
::
Info
(
".... Percentage of hexahedra (Vol) : %g"
,
vol_hexa_recombination
*
100.
/
vol_element_recombination
);
}
}
// Ensure that all volume Jacobians are positive
// Ensure that all volume Jacobians are positive
...
...
This diff is collapsed.
Click to expand it.
Mesh/pointInsertionRTreeTools.h
+
3
−
2
View file @
8894f67a
...
@@ -192,13 +192,14 @@ class compareSmoothnessVertexPairs
...
@@ -192,13 +192,14 @@ class compareSmoothnessVertexPairs
private:
private:
const
double
threshold
;
const
double
threshold
;
double
roundit
(
const
double
&
d
)
const
{
double
roundit
(
const
double
&
d
)
const
{
return
(
round
(
d
/
threshold
)
*
threshold
);
//return (round(d/threshold)*threshold);
return
((
int
)(
d
/
threshold
+
0.5
)
*
threshold
);
}
}
public
:
public
:
static
bool
vectorial
;
static
bool
vectorial
;
compareSmoothnessVertexPairs
()
:
threshold
(
0.05
){};
compareSmoothnessVertexPairs
()
:
threshold
(
0.05
){};
inline
bool
operator
()
(
const
smoothness_vertex_pair
*
a
,
const
smoothness_vertex_pair
*
b
)
const
inline
bool
operator
()
(
const
smoothness_vertex_pair
*
a
,
const
smoothness_vertex_pair
*
b
)
const
{
{
...
...
This diff is collapsed.
Click to expand it.
Mesh/yamakawa.cpp
+
864
−
845
View file @
8894f67a
This diff is collapsed.
Click to expand it.
Mesh/yamakawa.h
+
551
−
551
View file @
8894f67a
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