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
dbed7f28
Commit
dbed7f28
authored
13 years ago
by
Emilie Marchandise
Browse files
Options
Downloads
Patches
Plain Diff
bamg with compound edges
parent
b2f795c3
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/meshGFaceBamg.cpp
+22
-25
22 additions, 25 deletions
Mesh/meshGFaceBamg.cpp
contrib/bamg/bamg-gmsh.cpp
+1
-1
1 addition, 1 deletion
contrib/bamg/bamg-gmsh.cpp
with
23 additions
and
26 deletions
Mesh/meshGFaceBamg.cpp
+
22
−
25
View file @
dbed7f28
...
...
@@ -67,7 +67,7 @@ static void computeMeshMetricsForBamg(GFace *gf, int numV,
void
meshGFaceBamg
(
GFace
*
gf
){
//Replace edges by their compounds
//Replace edges by their compounds
std
::
list
<
GEdge
*>
edges
=
gf
->
edges
();
std
::
set
<
GEdge
*>
mySet
;
std
::
list
<
GEdge
*>::
iterator
it
=
edges
.
begin
();
...
...
@@ -83,7 +83,6 @@ void meshGFaceBamg(GFace *gf){
}
edges
.
clear
();
edges
.
insert
(
edges
.
begin
(),
mySet
.
begin
(),
mySet
.
end
());
std
::
set
<
MVertex
*>
bcVertex
;
for
(
std
::
list
<
GEdge
*>::
iterator
it
=
edges
.
begin
();
it
!=
edges
.
end
();
it
++
){
for
(
unsigned
int
i
=
0
;
i
<
(
*
it
)
->
lines
.
size
();
i
++
){
...
...
@@ -100,25 +99,25 @@ void meshGFaceBamg(GFace *gf){
all
.
insert
(
gf
->
triangles
[
i
]
->
getVertex
(
j
));
}
Vertex2
*
bamgVertices
=
new
Vertex2
[
bcVertex
.
size
()
+
all
.
size
()];
//all.size()];
//FIXME EMI: how should we define bamgVertices when we have remeshed compound edges not with lines not belonging to triangles of the compound face
int
numVertices
=
all
.
size
()
+
bcVertex
.
size
();
Vertex2
*
bamgVertices
=
new
Vertex2
[
numVertices
];
int
index
=
0
;
//for(std::set<MVertex*>::iterator it = all.begin(); it!=all.end(); ++it){
// if ((*it)->onWhat()->dim() <= 1){
//
for(std::set<MVertex*>::iterator it = all.begin(); it!=all.end(); ++it){
//
if ((*it)->onWhat()->dim() <= 1){
for
(
std
::
set
<
MVertex
*>::
iterator
it
=
bcVertex
.
begin
();
it
!=
bcVertex
.
end
();
++
it
){
SPoint2
p
;
bool
success
=
reparamMeshVertexOnFace
(
*
it
,
gf
,
p
);
bamgVertices
[
index
][
0
]
=
p
.
x
();
bamgVertices
[
index
][
1
]
=
p
.
y
();
bamgVertices
[
index
].
lab
=
index
;
recover
[
index
]
=
*
it
;
(
*
it
)
->
setIndex
(
index
++
);
//}
SPoint2
p
;
bool
success
=
reparamMeshVertexOnFace
(
*
it
,
gf
,
p
);
bamgVertices
[
index
][
0
]
=
p
.
x
();
bamgVertices
[
index
][
1
]
=
p
.
y
();
bamgVertices
[
index
].
lab
=
index
;
recover
[
index
]
=
*
it
;
(
*
it
)
->
setIndex
(
index
++
);
//}
}
int
nbFixedVertices
=
index
;
for
(
std
::
set
<
MVertex
*>::
iterator
it
=
all
.
begin
();
it
!=
all
.
end
();
++
it
){
// FIXME : SEAMS should have to be taken into account here !!!
int
nbFixedVertices
=
index
;
for
(
std
::
set
<
MVertex
*>::
iterator
it
=
all
.
begin
();
it
!=
all
.
end
();
++
it
){
//FIXME : SEAMS should have to be taken into account here !!!
if
((
*
it
)
->
onWhat
()
->
dim
()
>=
2
){
SPoint2
p
;
bool
success
=
reparamMeshVertexOnFace
(
*
it
,
gf
,
p
);
...
...
@@ -127,8 +126,7 @@ int nbFixedVertices = index;
recover
[
index
]
=
*
it
;
(
*
it
)
->
setIndex
(
index
++
);
}
}
}
Triangle2
*
bamgTriangles
=
new
Triangle2
[
gf
->
triangles
.
size
()];
for
(
unsigned
int
i
=
0
;
i
<
gf
->
triangles
.
size
();
i
++
){
int
nodes
[
3
]
=
{
gf
->
triangles
[
i
]
->
getVertex
(
0
)
->
getIndex
(),
...
...
@@ -148,6 +146,7 @@ int nbFixedVertices = index;
}
bamgTriangles
[
i
].
init
(
bamgVertices
,
nodes
,
gf
->
tag
());
}
int
numEdges
=
0
;
for
(
std
::
list
<
GEdge
*>::
iterator
it
=
edges
.
begin
();
it
!=
edges
.
end
();
++
it
){
numEdges
+=
(
*
it
)
->
lines
.
size
();
...
...
@@ -163,11 +162,9 @@ int nbFixedVertices = index;
bamgBoundary
[
count
++
].
lab
=
count
;
}
}
// Seg *bamgBoundary = NULL;
// numEdges = 0;
Mesh2
*
bamgMesh
=
new
Mesh2
(
all
.
size
(),
gf
->
triangles
.
size
(),
numEdges
,
bamgVertices
,
bamgTriangles
,
bamgBoundary
);
Mesh2
*
bamgMesh
=
new
Mesh2
(
all
.
size
(),
gf
->
triangles
.
size
(),
numEdges
,
bamgVertices
,
bamgTriangles
,
bamgBoundary
);
Mesh2
*
refinedBamgMesh
=
0
;
int
iterMax
=
11
;
...
...
This diff is collapsed.
Click to expand it.
contrib/bamg/bamg-gmsh.cpp
+
1
−
1
View file @
dbed7f28
...
...
@@ -569,7 +569,7 @@ Mesh2 *Bamg(Mesh2 *Thh, double * args,double *mm11,double *mm12,double *mm22, bo
for
(
int
iv
=
0
;
iv
<
Th
.
nbv
;
iv
++
)
Th
[
iv
].
m
=
M
;
//
nTh->Write("bamg.mesh",bamg::Triangles::AutoMesh);
nTh
->
Write
(
"bamg.mesh"
,
bamg
::
Triangles
::
AutoMesh
);
Mesh2
*
g
=
bamg2msh
(
nTh
,
true
);
delete
nTh
;
...
...
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