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
6f568b7d
Commit
6f568b7d
authored
12 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
fix bug in MED mesh export (ticket #172)
parent
202d5ecd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Geo/GModelIO_MED.cpp
+8
-2
8 additions, 2 deletions
Geo/GModelIO_MED.cpp
with
8 additions
and
2 deletions
Geo/GModelIO_MED.cpp
+
8
−
2
View file @
6f568b7d
...
@@ -467,7 +467,6 @@ static void fillElementsMED(med_int family, std::vector<T*> &elements,
...
@@ -467,7 +467,6 @@ static void fillElementsMED(med_int family, std::vector<T*> &elements,
std
::
vector
<
med_int
>
&
conn
,
std
::
vector
<
med_int
>
&
fam
,
std
::
vector
<
med_int
>
&
conn
,
std
::
vector
<
med_int
>
&
fam
,
med_geometrie_element
&
type
)
med_geometrie_element
&
type
)
{
{
type
=
MED_NONE
;
if
(
elements
.
empty
())
return
;
if
(
elements
.
empty
())
return
;
type
=
msh2medElementType
(
elements
[
0
]
->
getTypeForMSH
());
type
=
msh2medElementType
(
elements
[
0
]
->
getTypeForMSH
());
if
(
type
==
MED_NONE
){
if
(
type
==
MED_NONE
){
...
@@ -626,8 +625,8 @@ int GModel::writeMED(const std::string &name, bool saveAll, double scalingFactor
...
@@ -626,8 +625,8 @@ int GModel::writeMED(const std::string &name, bool saveAll, double scalingFactor
// write the elements
// write the elements
{
{
med_geometrie_element
typ
=
MED_NONE
;
{
// points
{
// points
med_geometrie_element
typ
=
MED_NONE
;
std
::
vector
<
med_int
>
conn
,
fam
;
std
::
vector
<
med_int
>
conn
,
fam
;
for
(
viter
it
=
firstVertex
();
it
!=
lastVertex
();
it
++
)
for
(
viter
it
=
firstVertex
();
it
!=
lastVertex
();
it
++
)
if
(
saveAll
||
(
*
it
)
->
physicals
.
size
())
if
(
saveAll
||
(
*
it
)
->
physicals
.
size
())
...
@@ -635,6 +634,7 @@ int GModel::writeMED(const std::string &name, bool saveAll, double scalingFactor
...
@@ -635,6 +634,7 @@ int GModel::writeMED(const std::string &name, bool saveAll, double scalingFactor
writeElementsMED
(
fid
,
meshName
,
conn
,
fam
,
typ
);
writeElementsMED
(
fid
,
meshName
,
conn
,
fam
,
typ
);
}
}
{
// lines
{
// lines
med_geometrie_element
typ
=
MED_NONE
;
std
::
vector
<
med_int
>
conn
,
fam
;
std
::
vector
<
med_int
>
conn
,
fam
;
for
(
eiter
it
=
firstEdge
();
it
!=
lastEdge
();
it
++
)
for
(
eiter
it
=
firstEdge
();
it
!=
lastEdge
();
it
++
)
if
(
saveAll
||
(
*
it
)
->
physicals
.
size
())
if
(
saveAll
||
(
*
it
)
->
physicals
.
size
())
...
@@ -642,6 +642,7 @@ int GModel::writeMED(const std::string &name, bool saveAll, double scalingFactor
...
@@ -642,6 +642,7 @@ int GModel::writeMED(const std::string &name, bool saveAll, double scalingFactor
writeElementsMED
(
fid
,
meshName
,
conn
,
fam
,
typ
);
writeElementsMED
(
fid
,
meshName
,
conn
,
fam
,
typ
);
}
}
{
// triangles
{
// triangles
med_geometrie_element
typ
=
MED_NONE
;
std
::
vector
<
med_int
>
conn
,
fam
;
std
::
vector
<
med_int
>
conn
,
fam
;
for
(
fiter
it
=
firstFace
();
it
!=
lastFace
();
it
++
)
for
(
fiter
it
=
firstFace
();
it
!=
lastFace
();
it
++
)
if
(
saveAll
||
(
*
it
)
->
physicals
.
size
())
if
(
saveAll
||
(
*
it
)
->
physicals
.
size
())
...
@@ -649,6 +650,7 @@ int GModel::writeMED(const std::string &name, bool saveAll, double scalingFactor
...
@@ -649,6 +650,7 @@ int GModel::writeMED(const std::string &name, bool saveAll, double scalingFactor
writeElementsMED
(
fid
,
meshName
,
conn
,
fam
,
typ
);
writeElementsMED
(
fid
,
meshName
,
conn
,
fam
,
typ
);
}
}
{
// quads
{
// quads
med_geometrie_element
typ
=
MED_NONE
;
std
::
vector
<
med_int
>
conn
,
fam
;
std
::
vector
<
med_int
>
conn
,
fam
;
for
(
fiter
it
=
firstFace
();
it
!=
lastFace
();
it
++
)
for
(
fiter
it
=
firstFace
();
it
!=
lastFace
();
it
++
)
if
(
saveAll
||
(
*
it
)
->
physicals
.
size
())
if
(
saveAll
||
(
*
it
)
->
physicals
.
size
())
...
@@ -656,6 +658,7 @@ int GModel::writeMED(const std::string &name, bool saveAll, double scalingFactor
...
@@ -656,6 +658,7 @@ int GModel::writeMED(const std::string &name, bool saveAll, double scalingFactor
writeElementsMED
(
fid
,
meshName
,
conn
,
fam
,
typ
);
writeElementsMED
(
fid
,
meshName
,
conn
,
fam
,
typ
);
}
}
{
// tets
{
// tets
med_geometrie_element
typ
=
MED_NONE
;
std
::
vector
<
med_int
>
conn
,
fam
;
std
::
vector
<
med_int
>
conn
,
fam
;
for
(
riter
it
=
firstRegion
();
it
!=
lastRegion
();
it
++
)
for
(
riter
it
=
firstRegion
();
it
!=
lastRegion
();
it
++
)
if
(
saveAll
||
(
*
it
)
->
physicals
.
size
())
if
(
saveAll
||
(
*
it
)
->
physicals
.
size
())
...
@@ -663,6 +666,7 @@ int GModel::writeMED(const std::string &name, bool saveAll, double scalingFactor
...
@@ -663,6 +666,7 @@ int GModel::writeMED(const std::string &name, bool saveAll, double scalingFactor
writeElementsMED
(
fid
,
meshName
,
conn
,
fam
,
typ
);
writeElementsMED
(
fid
,
meshName
,
conn
,
fam
,
typ
);
}
}
{
// hexas
{
// hexas
med_geometrie_element
typ
=
MED_NONE
;
std
::
vector
<
med_int
>
conn
,
fam
;
std
::
vector
<
med_int
>
conn
,
fam
;
for
(
riter
it
=
firstRegion
();
it
!=
lastRegion
();
it
++
)
for
(
riter
it
=
firstRegion
();
it
!=
lastRegion
();
it
++
)
if
(
saveAll
||
(
*
it
)
->
physicals
.
size
())
if
(
saveAll
||
(
*
it
)
->
physicals
.
size
())
...
@@ -670,6 +674,7 @@ int GModel::writeMED(const std::string &name, bool saveAll, double scalingFactor
...
@@ -670,6 +674,7 @@ int GModel::writeMED(const std::string &name, bool saveAll, double scalingFactor
writeElementsMED
(
fid
,
meshName
,
conn
,
fam
,
typ
);
writeElementsMED
(
fid
,
meshName
,
conn
,
fam
,
typ
);
}
}
{
// prisms
{
// prisms
med_geometrie_element
typ
=
MED_NONE
;
std
::
vector
<
med_int
>
conn
,
fam
;
std
::
vector
<
med_int
>
conn
,
fam
;
for
(
riter
it
=
firstRegion
();
it
!=
lastRegion
();
it
++
)
for
(
riter
it
=
firstRegion
();
it
!=
lastRegion
();
it
++
)
if
(
saveAll
||
(
*
it
)
->
physicals
.
size
())
if
(
saveAll
||
(
*
it
)
->
physicals
.
size
())
...
@@ -677,6 +682,7 @@ int GModel::writeMED(const std::string &name, bool saveAll, double scalingFactor
...
@@ -677,6 +682,7 @@ int GModel::writeMED(const std::string &name, bool saveAll, double scalingFactor
writeElementsMED
(
fid
,
meshName
,
conn
,
fam
,
typ
);
writeElementsMED
(
fid
,
meshName
,
conn
,
fam
,
typ
);
}
}
{
// pyramids
{
// pyramids
med_geometrie_element
typ
=
MED_NONE
;
std
::
vector
<
med_int
>
conn
,
fam
;
std
::
vector
<
med_int
>
conn
,
fam
;
for
(
riter
it
=
firstRegion
();
it
!=
lastRegion
();
it
++
)
for
(
riter
it
=
firstRegion
();
it
!=
lastRegion
();
it
++
)
if
(
saveAll
||
(
*
it
)
->
physicals
.
size
())
if
(
saveAll
||
(
*
it
)
->
physicals
.
size
())
...
...
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