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
294d3cd1
Commit
294d3cd1
authored
8 years ago
by
Jean-François Remacle
Browse files
Options
Downloads
Patches
Plain Diff
faster
parent
9a30e631
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Geo/discreteDiskFace.cpp
+2
-1
2 additions, 1 deletion
Geo/discreteDiskFace.cpp
Geo/discreteFace.cpp
+7
-2
7 additions, 2 deletions
Geo/discreteFace.cpp
with
9 additions
and
3 deletions
Geo/discreteDiskFace.cpp
+
2
−
1
View file @
294d3cd1
...
...
@@ -1164,6 +1164,7 @@ double triangulation::geodesicDistance () {
if
(
Fixed
.
size
()
==
v2t
.
size
())
break
;
}
/*
char name[256];
sprintf(name,"geodesicDistance%d.pos",idNum);
FILE *f = fopen(name,"w");
...
...
@@ -1180,7 +1181,7 @@ double triangulation::geodesicDistance () {
}
fprintf(f,"};\n");
fclose(f);
*/
return
CLOSEST
;
...
...
This diff is collapsed.
Click to expand it.
Geo/discreteFace.cpp
+
7
−
2
View file @
294d3cd1
...
...
@@ -154,7 +154,11 @@ void discreteFace::createGeometry()
toParam
.
push_back
(
toSplit
.
top
());
toSplit
.
top
()
->
idNum
=
id
++
;
}
clock_t
t1
=
clock
();
printf
(
"split done
\n
"
);
updateTopology
(
toParam
);
clock_t
t2
=
clock
();
printf
(
"topology done in %8.3f sec
\n
"
,(
double
)(
t2
-
t1
)
/
CLOCKS_PER_SEC
);
for
(
unsigned
int
i
=
0
;
i
<
toParam
.
size
();
i
++
){
printf
(
"MAP(%d) : aspect ratio = %12.5E
\n
"
,
toParam
[
i
]
->
idNum
,
toParam
[
i
]
->
aspectRatio
());
...
...
@@ -572,12 +576,12 @@ void discreteFace::updateTopology(std::vector<triangulation*>&partition)
std
::
set
<
GEdge
*>
gGEdges
(
l_edges
.
begin
(),
l_edges
.
end
());
// initial GEdges of the GFace (to be updated)
for
(
int
i
=
0
;
i
<
nPartitions
;
i
++
){
// each part is going ot be compared with the other ones
std
::
set
<
MEdge
,
Less_Edge
>
bordi
=
partition
[
i
]
->
borderEdg
;
// edges defining the border(s) of the i-th new triangulation
const
std
::
set
<
MEdge
,
Less_Edge
>
&
bordi
=
partition
[
i
]
->
borderEdg
;
// edges defining the border(s) of the i-th new triangulation
for
(
int
ii
=
i
+
1
;
ii
<
nPartitions
;
ii
++
){
// compare to the ii-th partitions, with ii > i since ii < i have already been compared
std
::
map
<
MVertex
*
,
MLine
*>
v02edg
;
//first vertex of the MLine
std
::
set
<
MVertex
*>
first
,
last
;
const
std
::
set
<
MEdge
,
Less_Edge
>
&
bii
=
partition
[
ii
]
->
borderEdg
;
// edges defining the border(s) of the ii-th new triangulation
for
(
std
::
set
<
MEdge
,
Less_Edge
>::
iterator
ie
=
bordi
.
begin
();
ie
!=
bordi
.
end
();
++
ie
){
// MEdge by MEdge of the i-th triangulation border(s)
std
::
set
<
MEdge
,
Less_Edge
>
bii
=
partition
[
ii
]
->
borderEdg
;
// edges defining the border(s) of the ii-th new triangulation
if
(
bii
.
find
(
*
ie
)
!=
bii
.
end
()){
// if the border edge is common to both triangulations, then it is a future GEdge - composed of MLine's
v02edg
[
ie
->
getVertex
(
0
)]
=
new
MLine
(
ie
->
getVertex
(
0
),
ie
->
getVertex
(
1
));
// a new MLine is created
...
...
@@ -638,6 +642,7 @@ void discreteFace::updateTopology(std::vector<triangulation*>&partition)
}
// end imvt
// the new GEdge can be created with its GVertex
discreteEdge
*
internalE
=
new
discreteEdge
(
this
->
model
(),
NEWLINE
(),
v
[
0
],
v
[
1
]);
// printf("creating new discrete edge %d with %d lines (%p %p)\n", internalE->tag(), myLines.size(),v[0],v[1]);
setupDiscreteEdge
(
internalE
,
myLines
,
&
todelete
);
partition
[
i
]
->
my_GEdges
.
push_back
(
internalE
);
partition
[
ii
]
->
my_GEdges
.
push_back
(
internalE
);
...
...
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