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
Analyze
Contributor 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
gmsh
gmsh
Commits
3595086d
There was a problem fetching the pipeline summary.
Commit
3595086d
authored
7 years ago
by
Koen Hillewaert
Browse files
Options
Downloads
Patches
Plain Diff
Coherent creation of mesh and topology for cgns
parent
10a61acb
No related branches found
No related tags found
2 merge requests
!145
Cgns
,
!138
Koen
Pipeline
#
Changes
2
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Geo/GModelCreateTopologyFromMesh.cpp
+17
-14
17 additions, 14 deletions
Geo/GModelCreateTopologyFromMesh.cpp
Geo/GModelIO_CGNS.cpp
+729
-387
729 additions, 387 deletions
Geo/GModelIO_CGNS.cpp
with
746 additions
and
401 deletions
Geo/GModelCreateTopologyFromMesh.cpp
+
17
−
14
View file @
3595086d
...
@@ -387,8 +387,7 @@ protected:
...
@@ -387,8 +387,7 @@ protected:
MElement
*
parent
;
MElement
*
parent
;
int
edgeIndex
;
int
edgeIndex
;
int
id0
;
std
::
pair
<
int
,
int
>
ids
;
int
id1
;
public:
public:
...
@@ -398,13 +397,11 @@ public:
...
@@ -398,13 +397,11 @@ public:
inline
bool
operator
==
(
const
topoEdge
&
f
)
const
inline
bool
operator
==
(
const
topoEdge
&
f
)
const
{
{
return
(
id
0
==
f
.
id
0
&&
f
.
id1
==
id1
)
;
return
id
s
==
f
.
id
s
;
}
}
inline
bool
operator
<
(
const
topoEdge
&
f
)
const
inline
bool
operator
<
(
const
topoEdge
&
f
)
const
{
{
if
(
id0
<
f
.
id0
)
return
true
;
return
ids
<
f
.
ids
;
if
(
id0
>
f
.
id0
)
return
false
;
return
id1
<
f
.
id1
;
}
}
topoEdge
(
MElement
*
elt
,
int
num
)
{
topoEdge
(
MElement
*
elt
,
int
num
)
{
...
@@ -413,10 +410,14 @@ public:
...
@@ -413,10 +410,14 @@ public:
edgeIndex
=
num
;
edgeIndex
=
num
;
MEdge
edge
=
elt
->
getEdge
(
num
);
MEdge
edge
=
elt
->
getEdge
(
num
);
id0
=
edge
.
getVertex
(
0
)
->
getNum
();
int
id0
=
edge
.
getVertex
(
0
)
->
getNum
();
id1
=
edge
.
getVertex
(
1
)
->
getNum
();
int
id1
=
edge
.
getVertex
(
1
)
->
getNum
();
if
(
id0
>
id1
)
std
::
swap
(
id0
,
id1
);
if
(
id0
>
id1
)
std
::
swap
(
id0
,
id1
);
ids
.
first
=
id0
;
ids
.
second
=
id1
;
}
}
};
};
...
@@ -450,12 +451,14 @@ void createTopologyFromMesh2D(GModel *gm, int &num)
...
@@ -450,12 +451,14 @@ void createTopologyFromMesh2D(GModel *gm, int &num)
GFace
*
gf
=
*
it
;
GFace
*
gf
=
*
it
;
for
(
unsigned
int
i
=
0
;
i
<
(
*
it
)
->
getNumMeshElements
();
i
++
){
for
(
unsigned
int
i
=
0
;
i
<
(
*
it
)
->
getNumMeshElements
();
i
++
){
MElement
*
e
=
(
*
it
)
->
getMeshElement
(
i
);
MElement
*
e
=
(
*
it
)
->
getMeshElement
(
i
);
for
(
int
j
=
0
;
j
<
e
->
getNumEdges
();
j
++
){
if
(
e
->
getDim
()
==
2
)
{
topoEdge
te
(
e
,
j
);
for
(
int
j
=
0
;
j
<
e
->
getNumEdges
();
j
++
){
TEdgeToGEdgeMap
::
iterator
eIter
=
tEdgeToGEdge
.
find
(
te
);
topoEdge
te
(
e
,
j
);
if
(
eIter
!=
tEdgeToGEdge
.
end
())
gFaceToGEdges
[
gf
].
insert
(
eIter
->
second
);
TEdgeToGEdgeMap
::
iterator
eIter
=
tEdgeToGEdge
.
find
(
te
);
else
tEdgeToGFaces
[
te
].
insert
(
gf
);
if
(
eIter
!=
tEdgeToGEdge
.
end
())
gFaceToGEdges
[
gf
].
insert
(
eIter
->
second
);
}
else
tEdgeToGFaces
[
te
].
insert
(
gf
);
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Geo/GModelIO_CGNS.cpp
+
729
−
387
View file @
3595086d
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