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
a7fef9f6
Commit
a7fef9f6
authored
3 years ago
by
jeremy theler
Browse files
Options
Downloads
Patches
Plain Diff
make sure there are always two entities per line in section 2477
parent
72ef318d
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!450
UNV output: make sure there are always two entities per line in section 2477
Pipeline
#8893
passed
3 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Geo/GModelIO_UNV.cpp
+16
-3
16 additions, 3 deletions
Geo/GModelIO_UNV.cpp
with
16 additions
and
3 deletions
Geo/GModelIO_UNV.cpp
+
16
−
3
View file @
a7fef9f6
...
...
@@ -466,8 +466,8 @@ int GModel::writeUNV(const std::string &name, bool saveAll,
0
,
0
,
(
int
)
nodes
.
size
()
+
nele
);
fprintf
(
fp
,
"%s
\n
"
,
physicalName
(
this
,
dim
,
it
->
first
).
c_str
());
int
row
=
0
;
if
(
saveGroupsOfNodes
)
{
int
row
=
0
;
for
(
auto
it2
=
nodes
.
begin
();
it2
!=
nodes
.
end
();
it2
++
)
{
if
(
row
==
2
)
{
fprintf
(
fp
,
"
\n
"
);
...
...
@@ -476,10 +476,17 @@ int GModel::writeUNV(const std::string &name, bool saveAll,
fprintf
(
fp
,
"%10d%10ld%10d%10d"
,
7
,
(
*
it2
)
->
getIndex
(),
0
,
0
);
row
++
;
}
}
// this output will be consumed by legacy codes that rely on
// full lines, each having two entities even if the first is
// a node and the second is an element
if
(
row
==
2
)
{
fprintf
(
fp
,
"
\n
"
);
row
=
0
;
}
if
(
saveGroupsOfElements
)
{
int
row
=
0
;
for
(
std
::
size_t
i
=
0
;
i
<
entities
.
size
();
i
++
)
{
for
(
std
::
size_t
j
=
0
;
j
<
entities
[
i
]
->
getNumMeshElements
();
j
++
)
{
MElement
*
e
=
entities
[
i
]
->
getMeshElement
(
j
);
...
...
@@ -492,7 +499,13 @@ int GModel::writeUNV(const std::string &name, bool saveAll,
}
}
fprintf
(
fp
,
"
\n
"
);
}
}
else
{
// print a final newline only if the count is odd
if
(
row
==
1
)
{
fprintf
(
fp
,
"
\n
"
);
}
}
}
}
fprintf
(
fp
,
"%6d
\n
"
,
-
1
);
...
...
This diff is collapsed.
Click to expand it.
jeremy theler
@jeremy
mentioned in issue
#1631 (closed)
·
3 years ago
mentioned in issue
#1631 (closed)
mentioned in issue #1631
Toggle commit list
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