Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
Manage
Activity
Members
Labels
Plan
Issues
77
Issue boards
Milestones
Wiki
Code
Merge requests
77
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dumux-repositories
dumux
Merge requests
!2880
[disc][io] Use discretization tag instead of enum for comparisons.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
[disc][io] Use discretization tag instead of enum for comparisons.
feature/tags-in-io
into
feature/discretization-tags-introduction
Overview
3
Commits
1
Pipelines
1
Changes
1
Closed
Ivan Buntic
requested to merge
feature/tags-in-io
into
feature/discretization-tags-introduction
3 years ago
Overview
3
Commits
1
Pipelines
1
Changes
1
Expand
👍
0
👎
0
Merge request reports
Compare
feature/discretization-tags-introduction
feature/discretization-tags-introduction (base)
and
latest version
latest version
0d013e45
1 commit,
3 years ago
1 file
+
4
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
dumux/io/loadsolution.hh
+
4
−
4
Options
@@ -151,7 +151,7 @@ auto loadSolutionFromVtkFile(SolutionVector& sol,
}
}
// for staggered face data (which is written out as VTK point data) we just read in the vector
else
if
(
dataType
==
VTKReader
::
DataType
::
pointData
&&
GridGeometry
::
discMethod
==
DiscretizationMethod
::
staggered
)
else
if
(
dataType
==
VTKReader
::
DataType
::
pointData
&&
GridGeometry
::
discMethod
==
DiscretizationMethod
s
::
staggered
)
{
if
(
sol
.
size
()
!=
vec
.
size
())
DUNE_THROW
(
Dune
::
InvalidStateException
,
"Solution size ("
<<
sol
.
size
()
<<
") does not match input size ("
<<
vec
.
size
()
<<
")!"
);
@@ -333,19 +333,19 @@ void loadSolution(SolutionVector& sol,
const
GridGeometry
&
gridGeometry
)
{
const
auto
extension
=
fileName
.
substr
(
fileName
.
find_last_of
(
"."
)
+
1
);
auto
dataType
=
GridGeometry
::
discMethod
==
DiscretizationMethod
::
box
?
auto
dataType
=
GridGeometry
::
discMethod
==
DiscretizationMethod
s
::
box
?
VTKReader
::
DataType
::
pointData
:
VTKReader
::
DataType
::
cellData
;
if
(
extension
==
"vtu"
||
extension
==
"vtp"
)
{
if
(
GridGeometry
::
discMethod
==
DiscretizationMethod
::
staggered
&&
extension
==
"vtp"
)
if
(
GridGeometry
::
discMethod
==
DiscretizationMethod
s
::
staggered
&&
extension
==
"vtp"
)
dataType
=
VTKReader
::
DataType
::
pointData
;
loadSolutionFromVtkFile
(
sol
,
fileName
,
targetPvNameFunc
,
gridGeometry
,
dataType
);
}
else
if
(
extension
==
"pvtu"
||
extension
==
"pvtp"
)
{
if
(
GridGeometry
::
discMethod
==
DiscretizationMethod
::
staggered
)
if
(
GridGeometry
::
discMethod
==
DiscretizationMethod
s
::
staggered
)
DUNE_THROW
(
Dune
::
NotImplemented
,
"reading staggered solution from a parallel vtk file"
);
loadSolutionFromVtkFile
(
sol
,
fileName
,
targetPvNameFunc
,
gridGeometry
,
dataType
);
Loading