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
c4a1cd8f
Commit
c4a1cd8f
authored
16 years ago
by
Stefen Guzik
Browse files
Options
Downloads
Patches
Plain Diff
CGNS testing
parent
e6af344c
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_CGNS.cpp
+65
-2
65 additions, 2 deletions
Geo/GModelIO_CGNS.cpp
with
65 additions
and
2 deletions
Geo/GModelIO_CGNS.cpp
+
65
−
2
View file @
c4a1cd8f
...
@@ -264,7 +264,6 @@ int GModel::writeCGNS(const std::string &name, int zoneDefinition,
...
@@ -264,7 +264,6 @@ int GModel::writeCGNS(const std::string &name, int zoneDefinition,
int
meshDim
;
int
meshDim
;
Msg
::
Warning
(
"CGNS I/O is at an
\"
alpha
\"
software stage"
);
Msg
::
Warning
(
"CGNS I/O is at an
\"
alpha
\"
software stage"
);
zoneDefinition
=
1
;
switch
(
zoneDefinition
)
{
switch
(
zoneDefinition
)
{
case
1
:
// By partition
case
1
:
// By partition
...
@@ -804,7 +803,22 @@ int write_CGNS_zones(GModel &model, const int zoneDefinition, const int numZone,
...
@@ -804,7 +803,22 @@ int write_CGNS_zones(GModel &model, const int zoneDefinition, const int numZone,
int
cgIndexZone
;
int
cgIndexZone
;
int
cgZoneSize
[
3
];
int
cgZoneSize
[
3
];
cgZoneSize
[
0
]
=
writeZone
->
zoneVertVec
.
size
();
// Number of vertices
cgZoneSize
[
0
]
=
writeZone
->
zoneVertVec
.
size
();
// Number of vertices
#ifdef CGNS_TEST1
// Count all the sub-elements in a Triangle 10
cgZoneSize
[
1
]
=
0
;
for
(
int
iElemType
=
0
;
iElemType
!=
MSH_NUM_TYPE
;
++
iElemType
)
{
switch
(
iElemType
)
{
case
MSH_TRI_10
-
1
:
cgZoneSize
[
1
]
+=
writeZone
->
zoneElemConn
[
MSH_TRI_10
-
1
].
numElem
*
9
;
break
;
default:
cgZoneSize
[
1
]
+=
writeZone
->
zoneElemConn
[
iElemType
].
numElem
;
break
;
}
}
#else
cgZoneSize
[
1
]
=
writeZone
->
totalElements
();
// Number of elements
cgZoneSize
[
1
]
=
writeZone
->
totalElements
();
// Number of elements
#endif
cgZoneSize
[
2
]
=
writeZone
->
numBoVert
;
// Number of boundary vertices
cgZoneSize
[
2
]
=
writeZone
->
numBoVert
;
// Number of boundary vertices
if
(
cg_zone_write
(
cgIndexFile
,
cgIndexBase
,
if
(
cg_zone_write
(
cgIndexFile
,
cgIndexBase
,
writeTask
->
zoneName
.
c_str
(),
cgZoneSize
,
writeTask
->
zoneName
.
c_str
(),
cgZoneSize
,
...
@@ -864,6 +878,56 @@ int write_CGNS_zones(GModel &model, const int zoneDefinition, const int numZone,
...
@@ -864,6 +878,56 @@ int write_CGNS_zones(GModel &model, const int zoneDefinition, const int numZone,
const
int
typeCGNS
=
msh2cgns
[
typeMSHm1
][
0
];
const
int
typeCGNS
=
msh2cgns
[
typeMSHm1
][
0
];
const
char
*
elemName
;
const
char
*
elemName
;
MElement
::
getInfoMSH
(
typeMSHm1
+
1
,
&
elemName
);
MElement
::
getInfoMSH
(
typeMSHm1
+
1
,
&
elemName
);
#ifdef CGNS_TEST1
if
(
typeMSHm1
==
MSH_TRI_10
-
1
)
{
const
int
nElem3o
=
writeZone
->
zoneElemConn
[
20
].
numElem
;
const
int
nElem1o
=
nElem3o
*
9
;
std
::
vector
<
int
>
subConn
(
nElem1o
*
3
);
int
iV
=
0
;
for
(
int
iElem3o
=
0
;
iElem3o
!=
nElem3o
;
++
iElem3o
)
{
int
*
elem3o
=
&
writeZone
->
zoneElemConn
[
20
].
connectivity
[
iElem3o
*
10
];
subConn
[
iV
++
]
=
elem3o
[
9
];
subConn
[
iV
++
]
=
elem3o
[
8
];
subConn
[
iV
++
]
=
elem3o
[
3
];
subConn
[
iV
++
]
=
elem3o
[
5
];
subConn
[
iV
++
]
=
elem3o
[
9
];
subConn
[
iV
++
]
=
elem3o
[
4
];
subConn
[
iV
++
]
=
elem3o
[
6
];
subConn
[
iV
++
]
=
elem3o
[
7
];
subConn
[
iV
++
]
=
elem3o
[
9
];
subConn
[
iV
++
]
=
elem3o
[
3
];
subConn
[
iV
++
]
=
elem3o
[
4
];
subConn
[
iV
++
]
=
elem3o
[
9
];
subConn
[
iV
++
]
=
elem3o
[
9
];
subConn
[
iV
++
]
=
elem3o
[
5
];
subConn
[
iV
++
]
=
elem3o
[
6
];
subConn
[
iV
++
]
=
elem3o
[
8
];
subConn
[
iV
++
]
=
elem3o
[
9
];
subConn
[
iV
++
]
=
elem3o
[
7
];
subConn
[
iV
++
]
=
elem3o
[
0
];
subConn
[
iV
++
]
=
elem3o
[
3
];
subConn
[
iV
++
]
=
elem3o
[
8
];
subConn
[
iV
++
]
=
elem3o
[
4
];
subConn
[
iV
++
]
=
elem3o
[
1
];
subConn
[
iV
++
]
=
elem3o
[
5
];
subConn
[
iV
++
]
=
elem3o
[
7
];
subConn
[
iV
++
]
=
elem3o
[
6
];
subConn
[
iV
++
]
=
elem3o
[
2
];
}
elemName
=
"Sub-Triangle 10"
;
int
cgIndexSection
;
if
(
cg_section_write
(
cgIndexFile
,
cgIndexBase
,
cgIndexZone
,
elemName
,
TRI_3
,
iElemSection
+
1
,
nElem1o
+
iElemSection
,
writeZone
->
zoneElemConn
[
20
].
numBoElem
*
9
+
iElemSection
,
&
subConn
[
0
],
&
cgIndexSection
))
return
cgnsErr
();
++
iElemSection
;
}
else
#endif
if
(
typeCGNS
==
-
1
)
{
if
(
typeCGNS
==
-
1
)
{
// This type is not supported in CGNS
// This type is not supported in CGNS
Msg
::
Warning
(
"Element type %s is not supported in CGNS and "
Msg
::
Warning
(
"Element type %s is not supported in CGNS and "
...
@@ -871,7 +935,6 @@ int write_CGNS_zones(GModel &model, const int zoneDefinition, const int numZone,
...
@@ -871,7 +935,6 @@ int write_CGNS_zones(GModel &model, const int zoneDefinition, const int numZone,
}
}
else
{
else
{
int
cgIndexSection
;
int
cgIndexSection
;
//**Replace blanks in 'elemName' with underscore?
if
(
cg_section_write
if
(
cg_section_write
(
cgIndexFile
,
cgIndexBase
,
cgIndexZone
,
elemName
,
(
cgIndexFile
,
cgIndexBase
,
cgIndexZone
,
elemName
,
static_cast
<
ElementType_t
>
(
typeCGNS
),
iElemSection
+
1
,
static_cast
<
ElementType_t
>
(
typeCGNS
),
iElemSection
+
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