Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
amdis
amdis-core
Commits
48e6a546
Commit
48e6a546
authored
Jun 20, 2019
by
Praetorius, Simon
Browse files
change output format for vtk files to allow parallel writes
parent
65242abd
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/amdis/FileWriter.hpp
View file @
48e6a546
...
...
@@ -86,9 +86,12 @@ namespace AMDiS
vtkWriter_
=
std
::
make_shared
<
Dune
::
VTKWriter
<
GridView
>>
(
gridView
());
if
(
animation_
)
vtkSeqWriter_
=
std
::
make_shared
<
Dune
::
VTKSequenceWriter
<
GridView
>>
(
vtkWriter_
,
filename_
,
dir_
,
""
);
vtkSeqWriter_
=
std
::
make_shared
<
Dune
::
VTKSequenceWriter
<
GridView
>>
(
vtkWriter_
,
filename_
,
dir_
,
"
data
"
);
vtkWriter_
->
addVertexData
(
discreteFct_
,
Dune
::
VTK
::
FieldInfo
(
name_
,
VTKFieldType
<
Range
>
,
VTKFieldSize
<
Range
>
));
test_exit
(
dir_
==
"."
||
filesystem
::
exists
(
dir_
),
"Output directory '{}' does not exist!"
,
dir_
);
filesystem
::
create_directories
(
dir_
+
"/data"
);
}
void
init
(
std
::
string
const
&
,
tag
::
unknown
)
{}
...
...
@@ -96,12 +99,10 @@ namespace AMDiS
/// Implements \ref FileWriterInterface::writeFiles
void
writeFiles
(
AdaptInfo
&
adaptInfo
,
bool
force
)
override
{
test_exit
(
dir_
==
"."
||
filesystem
::
exists
(
dir_
),
"Output directory '{}' does not exist!"
,
dir_
);
if
(
vtkSeqWriter_
)
vtkSeqWriter_
->
write
(
adaptInfo
.
time
(),
mode_
);
else
if
(
vtkWriter_
)
vtkWriter_
->
write
(
file
system
::
path
({
dir_
,
filename_
}).
string
()
,
mode_
);
vtkWriter_
->
p
write
(
file
name_
,
dir_
,
"data"
,
mode_
);
}
protected:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment