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
13ffc6f8
Commit
13ffc6f8
authored
9 years ago
by
Jean-François Remacle
Browse files
Options
Downloads
Patches
Plain Diff
more optimizations
parent
d4b04f25
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Mesh/delaunay3d.cpp
+1
-1
1 addition, 1 deletion
Mesh/delaunay3d.cpp
Mesh/delaunay_refinement.cpp
+6
-5
6 additions, 5 deletions
Mesh/delaunay_refinement.cpp
Mesh/meshGRegion.cpp
+1
-1
1 addition, 1 deletion
Mesh/meshGRegion.cpp
benchmarks/3d/Cube-01.geo
+1
-0
1 addition, 0 deletions
benchmarks/3d/Cube-01.geo
with
9 additions
and
7 deletions
Mesh/delaunay3d.cpp
+
1
−
1
View file @
13ffc6f8
...
@@ -809,7 +809,7 @@ void delaunayTriangulation (const int numThreads,
...
@@ -809,7 +809,7 @@ void delaunayTriangulation (const int numThreads,
S
.
clear
();
S
.
clear
();
delaunayTrgl
(
1
,
1
,
assignTo0
[
0
].
size
(),
assignTo0
,
allocator
);
delaunayTrgl
(
1
,
1
,
assignTo0
[
0
].
size
(),
assignTo0
,
allocator
);
delaunayTrgl
(
numThreads
,
nptsatonce
,
N
,
&
assignTo
[
0
],
allocator
);
delaunayTrgl
(
numThreads
,
nptsatonce
,
N
,
&
assignTo
[
0
],
allocator
);
__print
(
"finalTetrahedrization.pos"
,
0
,
allocator
);
//
__print ("finalTetrahedrization.pos",0, allocator);
}
}
...
...
This diff is collapsed.
Click to expand it.
Mesh/delaunay_refinement.cpp
+
6
−
5
View file @
13ffc6f8
...
@@ -57,9 +57,9 @@ double adaptiveTrapezoidalRule (SPoint3 p1 , SPoint3 p2 ,
...
@@ -57,9 +57,9 @@ double adaptiveTrapezoidalRule (SPoint3 p1 , SPoint3 p2 ,
double
lc1
,
double
lc2
,
double
lc1
,
double
lc2
,
double
(
*
f
)(
const
SPoint3
&
p
,
void
*
),
double
(
*
f
)(
const
SPoint3
&
p
,
void
*
),
void
*
data
,
std
::
vector
<
IPT
>
&
_result
,
void
*
data
,
std
::
vector
<
IPT
>
&
_result
,
double
&
dl
,
double
epsilon
=
1.e-5
)
double
&
dl
,
std
::
stack
<
IPT
>
&
_stack
,
double
epsilon
=
1.e-5
)
{
{
std
::
stack
<
IPT
>
_stack
;
// _stack.clear()
;
_result
.
clear
();
_result
.
clear
();
// local parameters on the edge
// local parameters on the edge
double
t1
=
0.0
;
double
t1
=
0.0
;
...
@@ -112,12 +112,12 @@ double adaptiveTrapezoidalRule (SPoint3 p1 , SPoint3 p2 ,
...
@@ -112,12 +112,12 @@ double adaptiveTrapezoidalRule (SPoint3 p1 , SPoint3 p2 ,
}
}
void
saturateEdge
(
Edge
&
e
,
std
::
vector
<
Vertex
*>
&
S
,
double
(
*
f
)(
const
SPoint3
&
p
,
void
*
),
void
*
data
)
{
void
saturateEdge
(
Edge
&
e
,
std
::
vector
<
Vertex
*>
&
S
,
double
(
*
f
)(
const
SPoint3
&
p
,
void
*
),
void
*
data
,
std
::
stack
<
IPT
>
&
temp
)
{
std
::
vector
<
IPT
>
_result
;
std
::
vector
<
IPT
>
_result
;
double
dl
;
double
dl
;
SPoint3
p1
=
e
.
first
->
point
();
SPoint3
p1
=
e
.
first
->
point
();
SPoint3
p2
=
e
.
second
->
point
();
SPoint3
p2
=
e
.
second
->
point
();
const
double
dN
=
adaptiveTrapezoidalRule
(
p1
,
p2
,
e
.
first
->
lc
(),
e
.
second
->
lc
(),
f
,
data
,
_result
,
dl
);
const
double
dN
=
adaptiveTrapezoidalRule
(
p1
,
p2
,
e
.
first
->
lc
(),
e
.
second
->
lc
(),
f
,
data
,
_result
,
dl
,
temp
);
const
int
N
=
(
int
)
(
dN
+
0.1
);
const
int
N
=
(
int
)
(
dN
+
0.1
);
const
double
interval
=
dN
/
N
;
const
double
interval
=
dN
/
N
;
double
L
=
0.0
;
double
L
=
0.0
;
...
@@ -160,6 +160,7 @@ void saturateEdges ( edgeContainer &ec,
...
@@ -160,6 +160,7 @@ void saturateEdges ( edgeContainer &ec,
int
nbThreads
,
int
nbThreads
,
std
::
vector
<
Vertex
*>
&
S
,
std
::
vector
<
Vertex
*>
&
S
,
double
(
*
f
)(
const
SPoint3
&
p
,
void
*
),
void
*
data
)
{
double
(
*
f
)(
const
SPoint3
&
p
,
void
*
),
void
*
data
)
{
std
::
stack
<
IPT
>
temp
;
AVGSEARCH
=
0
;
AVGSEARCH
=
0
;
// FIXME
// FIXME
const
int
N
=
T
.
size
(
0
);
const
int
N
=
T
.
size
(
0
);
...
@@ -171,7 +172,7 @@ void saturateEdges ( edgeContainer &ec,
...
@@ -171,7 +172,7 @@ void saturateEdges ( edgeContainer &ec,
Edge
ed
=
t
->
getEdge
(
iEdge
);
Edge
ed
=
t
->
getEdge
(
iEdge
);
bool
isNew
=
ec
.
addNewEdge
(
ed
);
bool
isNew
=
ec
.
addNewEdge
(
ed
);
if
(
isNew
){
if
(
isNew
){
saturateEdge
(
ed
,
S
,
f
,
data
);
saturateEdge
(
ed
,
S
,
f
,
data
,
temp
);
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Mesh/meshGRegion.cpp
+
1
−
1
View file @
13ffc6f8
...
@@ -592,7 +592,7 @@ void MeshDelaunayVolumeTetgen(std::vector<GRegion*> ®ions)
...
@@ -592,7 +592,7 @@ void MeshDelaunayVolumeTetgen(std::vector<GRegion*> ®ions)
}
}
// uncomment this to test the new code
// uncomment this to test the new code
//
#define NEW_CODE
#define NEW_CODE
static
void
MeshDelaunayVolumeNewCode
(
std
::
vector
<
GRegion
*>
&
regions
)
{
static
void
MeshDelaunayVolumeNewCode
(
std
::
vector
<
GRegion
*>
&
regions
)
{
GRegion
*
gr
=
regions
[
0
];
GRegion
*
gr
=
regions
[
0
];
...
...
This diff is collapsed.
Click to expand it.
benchmarks/3d/Cube-01.geo
+
1
−
0
View file @
13ffc6f8
...
@@ -18,3 +18,4 @@ Line Loop(5) = {2,3,4,1};
...
@@ -18,3 +18,4 @@ Line Loop(5) = {2,3,4,1};
Plane
Surface
(
6
)
=
{
5
};
Plane
Surface
(
6
)
=
{
5
};
Extrude
Surface
{
6
,
{
0
,
0.0
,
1
}
};
Extrude
Surface
{
6
,
{
0
,
0.0
,
1
}
};
//Characteristic Length {10} = lc/100;
//Characteristic Length {10} = lc/100;
Physical
Point
(
1
)
=
{
1
};
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