Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Chaofan Chen
ogs
Commits
8e8aae10
Commit
8e8aae10
authored
4 months ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[MeL/IO/XDMF] Init tuple_size with correct value
parent
a7ad7adb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MeshLib/IO/XDMF/transformData.cpp
+10
-5
10 additions, 5 deletions
MeshLib/IO/XDMF/transformData.cpp
MeshLib/IO/XDMF/writeXdmf.cpp
+4
-2
4 additions, 2 deletions
MeshLib/IO/XDMF/writeXdmf.cpp
with
14 additions
and
7 deletions
MeshLib/IO/XDMF/transformData.cpp
+
10
−
5
View file @
8e8aae10
...
...
@@ -395,11 +395,16 @@ XdmfHdfData transformTopology(std::vector<std::size_t> const& values,
unsigned
int
const
chunk_size_bytes
)
{
std
::
string
const
name
=
"topology"
;
HdfData
const
hdf
=
{
values
.
data
(),
values
.
size
(),
1
,
name
,
MeshPropertyDataType
::
uint64
,
n_files
,
chunk_size_bytes
};
XdmfData
const
xdmf
{
values
.
size
(),
1
,
auto
const
tuple_size
=
ParentDataType2String
(
parent_data_type
).
second
;
HdfData
const
hdf
=
{
values
.
data
(),
values
.
size
()
/
tuple_size
,
tuple_size
,
name
,
MeshPropertyDataType
::
uint64
,
n_files
,
chunk_size_bytes
};
XdmfData
const
xdmf
{
values
.
size
()
/
tuple_size
,
tuple_size
,
MeshPropertyDataType
::
uint64
,
name
,
std
::
nullopt
,
...
...
This diff is collapsed.
Click to expand it.
MeshLib/IO/XDMF/writeXdmf.cpp
+
4
−
2
View file @
8e8aae10
...
...
@@ -204,12 +204,14 @@ std::function<std::string(std::vector<double>)> write_xdmf(
{
return
fmt
::
format
(
fmt
::
runtime
(
"
\n\t
<Topology Type=
\"
{topology_type}
\"
"
"NodesPerElement=
\"
{nodes_per_element}
\"
>{dataitem}"
"NodesPerElement=
\"
{nodes_per_element}
\"
"
"NumberOfElements=
\"
{number_of_elements}
\"
>{dataitem}"
"
\n\t
</Topology>"
),
"topology_type"
_a
=
ParentDataType2String
(
*
topology
.
parent_data_type
),
"dataitem"
_a
=
dataitem_transform
(
topology
),
"nodes_per_element"
_a
=
nodes_per_element
);
"nodes_per_element"
_a
=
nodes_per_element
,
"number_of_elements"
_a
=
topology
.
size_partitioned_dim
);
};
// Define content of <Topology> in XDMF, same as attribute_transform
...
...
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