OGS
ProcessLib::Output Class Reference

Detailed Description

Manages writing the solution of processes to disk.

This class decides at which timesteps output is written and initiates the writing process.

Definition at line 29 of file Output.h.

#include <Output.h>

Collaboration diagram for ProcessLib::Output:
[legend]

Classes

struct  OutputFile
 
struct  PairRepeatEachSteps
 

Public Member Functions

 Output (std::string directory, OutputType const type, std::string prefix, std::string suffix, bool const compress_output, unsigned int n_files, std::string const &data_mode, bool const output_nonlinear_iteration_results, std::vector< PairRepeatEachSteps > repeats_each_steps, std::vector< double > &&fixed_output_times, OutputDataSpecification &&output_data_specification, std::vector< std::string > &&mesh_names_for_output, std::vector< std::unique_ptr< MeshLib::Mesh >> const &meshes)
 
void addProcess (ProcessLib::Process const &process)
 TODO doc. Opens a PVD file for each process. More...
 
void doOutput (Process const &process, const int process_id, int const timestep, const double t, int const iteration, std::vector< GlobalVector * > const &x)
 
void doOutputLastTimestep (Process const &process, const int process_id, int const timestep, const double t, int const iteration, std::vector< GlobalVector * > const &x)
 
void doOutputAlways (Process const &process, const int process_id, int const timestep, const double t, int const iteration, std::vector< GlobalVector * > const &x)
 
void doOutputNonlinearIteration (Process const &process, const int process_id, int const timestep, const double t, const int iteration, std::vector< GlobalVector * > const &x)
 
std::vector< double > getFixedOutputTimes () const
 

Private Member Functions

void outputMeshXdmf (OutputFile const &output_file, std::vector< std::reference_wrapper< const MeshLib::Mesh >> meshes, int const timestep, double const t)
 
MeshLib::IO::PVDFilefindPVDFile (Process const &process, const int process_id, std::string const &mesh_name_for_output)
 
bool shallDoOutput (int timestep, double const t)
 Determines if there should be output at the given timestep or t. More...
 

Static Private Member Functions

static void outputMesh (OutputFile const &output_file, MeshLib::IO::PVDFile *const pvd_file, MeshLib::Mesh const &mesh, double const t)
 

Private Attributes

std::unique_ptr< MeshLib::IO::XdmfHdfWriter_mesh_xdmf_hdf_writer
 
std::string const _output_directory
 
OutputType const _output_file_type
 
std::string const _output_file_prefix
 
std::string const _output_file_suffix
 
bool const _output_file_compression
 Enables or disables zlib-compression of the output files. More...
 
unsigned int const _n_files
 Specifies the number of hdf5 output files. More...
 
int const _output_file_data_mode
 
bool const _output_nonlinear_iteration_results
 
std::vector< PairRepeatEachSteps_repeats_each_steps
 Describes after which timesteps to write output. More...
 
std::vector< double > const _fixed_output_times
 Given times that steps have to reach. More...
 
std::multimap< Process const *, MeshLib::IO::PVDFile_process_to_pvd_file
 
OutputDataSpecification const _output_data_specification
 
std::vector< std::string > _mesh_names_for_output
 
std::vector< std::unique_ptr< MeshLib::Mesh > > const & _meshes
 

Constructor & Destructor Documentation

◆ Output()

ProcessLib::Output::Output ( std::string  directory,
OutputType const  type,
std::string  prefix,
std::string  suffix,
bool const  compress_output,
unsigned int  n_files,
std::string const &  data_mode,
bool const  output_nonlinear_iteration_results,
std::vector< PairRepeatEachSteps repeats_each_steps,
std::vector< double > &&  fixed_output_times,
OutputDataSpecification &&  output_data_specification,
std::vector< std::string > &&  mesh_names_for_output,
std::vector< std::unique_ptr< MeshLib::Mesh >> const &  meshes 
)

Definition at line 96 of file Output.cpp.

106  : _output_directory(std::move(directory)),
107  _output_file_type(file_type),
108  _output_file_prefix(std::move(file_prefix)),
109  _output_file_suffix(std::move(file_suffix)),
110  _output_file_compression(compress_output),
111  _n_files(n_files),
113  _output_nonlinear_iteration_results(output_nonlinear_iteration_results),
114  _repeats_each_steps(std::move(repeats_each_steps)),
115  _fixed_output_times(std::move(fixed_output_times)),
116  _output_data_specification(std::move(output_data_specification)),
117  _mesh_names_for_output(mesh_names_for_output),
118  _meshes(meshes)
119 {
120  if (!std::is_sorted(cbegin(_fixed_output_times), cend(_fixed_output_times)))
121  {
122  OGS_FATAL(
123  "Vector of fixed output time steps passed to the Output "
124  "constructor must be sorted");
125  }
126 }
#define OGS_FATAL(...)
Definition: Error.h:26
std::vector< PairRepeatEachSteps > _repeats_each_steps
Describes after which timesteps to write output.
Definition: Output.h:121
bool const _output_file_compression
Enables or disables zlib-compression of the output files.
Definition: Output.h:110
std::vector< std::string > _mesh_names_for_output
Definition: Output.h:143
std::string const _output_file_prefix
Definition: Output.h:106
OutputDataSpecification const _output_data_specification
Definition: Output.h:142
int const _output_file_data_mode
Definition: Output.h:117
std::string const _output_directory
Definition: Output.h:104
std::vector< double > const _fixed_output_times
Given times that steps have to reach.
Definition: Output.h:124
OutputType const _output_file_type
Definition: Output.h:105
unsigned int const _n_files
Specifies the number of hdf5 output files.
Definition: Output.h:112
std::string const _output_file_suffix
Definition: Output.h:107
std::vector< std::unique_ptr< MeshLib::Mesh > > const & _meshes
Definition: Output.h:144
bool const _output_nonlinear_iteration_results
Definition: Output.h:118
int convertVtkDataMode(std::string const &data_mode)
Definition: Output.cpp:28

References _fixed_output_times, and OGS_FATAL.

Member Function Documentation

◆ addProcess()

void ProcessLib::Output::addProcess ( ProcessLib::Process const &  process)

TODO doc. Opens a PVD file for each process.

Definition at line 128 of file Output.cpp.

129 {
130  if (_mesh_names_for_output.empty())
131  {
132  _mesh_names_for_output.push_back(process.getMesh().getName());
133  }
134 
135  for (auto const& mesh_output_name : _mesh_names_for_output)
136  {
137  auto const filename = constructPVDName(
138  _output_directory, _output_file_prefix, mesh_output_name);
139  _process_to_pvd_file.emplace(std::piecewise_construct,
140  std::forward_as_tuple(&process),
141  std::forward_as_tuple(filename));
142  }
143 }
std::multimap< Process const *, MeshLib::IO::PVDFile > _process_to_pvd_file
Definition: Output.h:126
std::string constructPVDName(std::string const &output_directory, std::string const &output_file_prefix, std::string const &mesh_name)
Definition: Output.cpp:48

References _mesh_names_for_output, _output_directory, _output_file_prefix, _process_to_pvd_file, anonymous_namespace{Output.cpp}::constructPVDName(), ProcessLib::Process::getMesh(), and MeshLib::Mesh::getName().

◆ doOutput()

void ProcessLib::Output::doOutput ( Process const &  process,
const int  process_id,
int const  timestep,
const double  t,
int const  iteration,
std::vector< GlobalVector * > const &  x 
)

Writes output for the given process if it should be written in the given timestep.

Definition at line 399 of file Output.cpp.

405 {
406  if (shallDoOutput(timestep, t))
407  {
408  doOutputAlways(process, process_id, timestep, t, iteration, x);
409  }
410 #ifdef USE_INSITU
411  // Note: last time step may be output twice: here and in
412  // doOutputLastTimestep() which throws a warning.
413  InSituLib::CoProcess(process.getMesh(), t, timestep, false,
415 #endif
416 }
bool shallDoOutput(int timestep, double const t)
Determines if there should be output at the given timestep or t.
Definition: Output.cpp:61
void doOutputAlways(Process const &process, const int process_id, int const timestep, const double t, int const iteration, std::vector< GlobalVector * > const &x)
Definition: Output.cpp:277
void CoProcess(MeshLib::Mesh const &mesh, double const time, unsigned int const timeStep, bool const lastTimeStep, std::string output_directory)
Definition: Adaptor.cpp:67

References _output_directory, InSituLib::CoProcess(), doOutputAlways(), ProcessLib::Process::getMesh(), and shallDoOutput().

Referenced by ProcessLib::TimeLoop::initialize(), and ProcessLib::TimeLoop::loop().

◆ doOutputAlways()

void ProcessLib::Output::doOutputAlways ( Process const &  process,
const int  process_id,
int const  timestep,
const double  t,
int const  iteration,
std::vector< GlobalVector * > const &  x 
)

Writes output for the given process. This method will always write. It is intended to write output in error handling routines.

Definition at line 277 of file Output.cpp.

283 {
284  BaseLib::RunTime time_output;
285  time_output.start();
286 
287  std::vector<NumLib::LocalToGlobalIndexMap const*> dof_tables;
288  dof_tables.reserve(x.size());
289  for (std::size_t i = 0; i < x.size(); ++i)
290  {
291  dof_tables.push_back(&process.getDOFTable(i));
292  }
293 
294  bool output_secondary_variable = true;
295  // Need to add variables of process to vtu even no output takes place.
296  addProcessDataToMesh(t, x, process_id, process.getMesh(), dof_tables,
297  dof_tables, process.getProcessVariables(process_id),
298  process.getSecondaryVariables(),
299  output_secondary_variable,
300  process.getIntegrationPointWriter(process.getMesh()),
302 
303  // For the staggered scheme for the coupling, only the last process, which
304  // gives the latest solution within a coupling loop, is allowed to make
305  // output.
306  if (!(process_id == static_cast<int>(_process_to_pvd_file.size() /
307  _mesh_names_for_output.size()) -
308  1 ||
309  process.isMonolithicSchemeUsed()))
310  {
311  return;
312  }
313 
314  auto output_bulk_mesh =
315  [&](std::vector<std::reference_wrapper<const MeshLib::Mesh>> meshes)
316  {
317  MeshLib::IO::PVDFile* pvd_file = nullptr;
319  {
320  for (auto const& mesh : meshes)
321  {
322  OutputFile const file(
324  _output_file_suffix, mesh.get().getName(), timestep, t,
327 
328  pvd_file =
329  findPVDFile(process, process_id, mesh.get().getName());
330  outputMesh(file, pvd_file, mesh, t);
331  }
332  }
334  {
335  std::string name = meshes[0].get().getName();
336  OutputFile const file(
338  name, timestep, t, iteration, _output_file_data_mode,
341 
342  outputMeshXdmf(std::move(file), std::move(meshes), timestep, t);
343  }
344  };
345 
346  std::vector<std::reference_wrapper<const MeshLib::Mesh>> output_meshes;
347  for (auto const& mesh_output_name : _mesh_names_for_output)
348  {
349  // process related output
350  if (process.getMesh().getName() == mesh_output_name)
351  {
352  output_meshes.push_back(process.getMesh());
353  continue;
354  }
355  // mesh related output
356  auto& non_bulk_mesh = *BaseLib::findElementOrError(
357  begin(_meshes), end(_meshes),
358  [&mesh_output_name](auto const& m)
359  { return m->getName() == mesh_output_name; },
360  "Need mesh '" + mesh_output_name + "' for the output.");
361 
362  std::vector<MeshLib::Node*> const& nodes = non_bulk_mesh.getNodes();
363  DBUG("Found {:d} nodes for output at mesh '{:s}'.", nodes.size(),
364  non_bulk_mesh.getName());
365 
366  std::vector<std::unique_ptr<NumLib::LocalToGlobalIndexMap>>
367  mesh_dof_tables;
368  mesh_dof_tables.reserve(x.size());
369  for (std::size_t i = 0; i < x.size(); ++i)
370  {
371  mesh_dof_tables.push_back(
372  process.getDOFTable(i).deriveBoundaryConstrainedMap(
373  MeshLib::MeshSubset{non_bulk_mesh, nodes}));
374  }
375  std::vector<NumLib::LocalToGlobalIndexMap const*>
376  mesh_dof_table_pointers;
377  mesh_dof_table_pointers.reserve(mesh_dof_tables.size());
378  transform(cbegin(mesh_dof_tables), cend(mesh_dof_tables),
379  back_inserter(mesh_dof_table_pointers),
380  [](std::unique_ptr<NumLib::LocalToGlobalIndexMap> const& p)
381  { return p.get(); });
382 
383  output_secondary_variable = false;
385  t, x, process_id, non_bulk_mesh, dof_tables,
386  mesh_dof_table_pointers, process.getProcessVariables(process_id),
387  process.getSecondaryVariables(), output_secondary_variable,
388  process.getIntegrationPointWriter(non_bulk_mesh),
390 
391  output_meshes.push_back(non_bulk_mesh);
392  }
393 
394  output_bulk_mesh(std::move(output_meshes));
395  INFO("[time] Output of timestep {:d} took {:g} s.", timestep,
396  time_output.elapsed());
397 }
void INFO(char const *fmt, Args const &... args)
Definition: Logging.h:32
void DBUG(char const *fmt, Args const &... args)
Definition: Logging.h:27
Count the running time.
Definition: RunTime.h:29
double elapsed() const
Get the elapsed time in seconds.
Definition: RunTime.h:42
void start()
Start the timer.
Definition: RunTime.h:32
A subset of nodes on a single mesh.
Definition: MeshSubset.h:27
void outputMeshXdmf(OutputFile const &output_file, std::vector< std::reference_wrapper< const MeshLib::Mesh >> meshes, int const timestep, double const t)
Definition: Output.cpp:238
static void outputMesh(OutputFile const &output_file, MeshLib::IO::PVDFile *const pvd_file, MeshLib::Mesh const &mesh, double const t)
Definition: Output.cpp:261
MeshLib::IO::PVDFile * findPVDFile(Process const &process, const int process_id, std::string const &mesh_name_for_output)
Definition: Output.cpp:146
std::iterator_traits< InputIt >::reference findElementOrError(InputIt begin, InputIt end, Predicate predicate, std::string const &error="")
Definition: Algorithm.h:69
void addProcessDataToMesh(const double t, std::vector< GlobalVector * > const &x, int const process_id, MeshLib::Mesh &mesh, [[maybe_unused]] std::vector< NumLib::LocalToGlobalIndexMap const * > const &bulk_dof_tables, std::vector< NumLib::LocalToGlobalIndexMap const * > const &dof_table, std::vector< std::reference_wrapper< ProcessVariable >> const &process_variables, SecondaryVariableCollection const &secondary_variables, bool const output_secondary_variable, std::vector< std::unique_ptr< IntegrationPointWriter >> const *const integration_point_writer, OutputDataSpecification const &process_output)
std::set< std::string > output_variables
All variables that shall be output.
Definition: ProcessOutput.h:25

References _mesh_names_for_output, _meshes, _n_files, _output_data_specification, _output_directory, _output_file_compression, _output_file_data_mode, _output_file_prefix, _output_file_suffix, _output_file_type, _process_to_pvd_file, ProcessLib::addProcessDataToMesh(), DBUG(), NumLib::LocalToGlobalIndexMap::deriveBoundaryConstrainedMap(), BaseLib::RunTime::elapsed(), BaseLib::findElementOrError(), findPVDFile(), ProcessLib::Process::getDOFTable(), ProcessLib::Process::getIntegrationPointWriter(), ProcessLib::Process::getMesh(), MeshLib::Mesh::getName(), ProcessLib::Process::getProcessVariables(), ProcessLib::Process::getSecondaryVariables(), INFO(), ProcessLib::Process::isMonolithicSchemeUsed(), MaterialPropertyLib::name, ProcessLib::OutputDataSpecification::output_variables, outputMesh(), outputMeshXdmf(), BaseLib::RunTime::start(), ProcessLib::vtk, and ProcessLib::xdmf.

Referenced by doOutput(), and doOutputLastTimestep().

◆ doOutputLastTimestep()

void ProcessLib::Output::doOutputLastTimestep ( Process const &  process,
const int  process_id,
int const  timestep,
const double  t,
int const  iteration,
std::vector< GlobalVector * > const &  x 
)

Writes output for the given process if it has not been written yet. This method is intended for doing output after the last timestep in order to make sure that its results are written.

Definition at line 418 of file Output.cpp.

424 {
425  if (!shallDoOutput(timestep, t))
426  {
427  doOutputAlways(process, process_id, timestep, t, iteration, x);
428  }
429 #ifdef USE_INSITU
430  InSituLib::CoProcess(process.getMesh(), t, timestep, true,
432 #endif
433 }

References _output_directory, InSituLib::CoProcess(), doOutputAlways(), ProcessLib::Process::getMesh(), and shallDoOutput().

Referenced by ProcessLib::TimeLoop::loop().

◆ doOutputNonlinearIteration()

void ProcessLib::Output::doOutputNonlinearIteration ( Process const &  process,
const int  process_id,
int const  timestep,
const double  t,
const int  iteration,
std::vector< GlobalVector * > const &  x 
)

Writes output for the given process. To be used for debug output after an iteration of the nonlinear solver.

Definition at line 435 of file Output.cpp.

440 {
442  {
443  return;
444  }
445 
446  BaseLib::RunTime time_output;
447  time_output.start();
448 
449  std::vector<NumLib::LocalToGlobalIndexMap const*> dof_tables;
450  for (std::size_t i = 0; i < x.size(); ++i)
451  {
452  dof_tables.push_back(&process.getDOFTable(i));
453  }
454 
455  bool const output_secondary_variable = true;
456  addProcessDataToMesh(t, x, process_id, process.getMesh(), dof_tables,
457  dof_tables, process.getProcessVariables(process_id),
458  process.getSecondaryVariables(),
459  output_secondary_variable,
460  process.getIntegrationPointWriter(process.getMesh()),
462 
463  // For the staggered scheme for the coupling, only the last process, which
464  // gives the latest solution within a coupling loop, is allowed to make
465  // output.
466  if (!(process_id == static_cast<int>(_process_to_pvd_file.size()) - 1 ||
467  process.isMonolithicSchemeUsed()))
468  {
469  return;
470  }
471 
472  // Only check whether a process data is available for output.
473  findPVDFile(process, process_id, process.getMesh().getName());
474 
475  std::string const output_file_name = OutputFile::constructFilename(
477  process.getMesh().getName(), timestep, t, iteration);
478 
479  std::string const output_file_path =
480  BaseLib::joinPaths(_output_directory, output_file_name);
481 
482  DBUG("output iteration results to {:s}", output_file_path);
483  makeOutput(output_file_path, process.getMesh(), _output_file_compression,
485  INFO("[time] Output took {:g} s.", time_output.elapsed());
486 }
std::string joinPaths(std::string const &pathA, std::string const &pathB)
Definition: FileTools.cpp:212
void makeOutput(std::string const &file_name, MeshLib::Mesh const &mesh, bool const compress_output, int const data_mode)
static std::string constructFilename(OutputType const type, std::string prefix, std::string suffix, std::string mesh_name, int const timestep, double const t, int const iteration)
Definition: Output.cpp:210

References _output_data_specification, _output_directory, _output_file_compression, _output_file_data_mode, _output_file_prefix, _output_file_suffix, _output_file_type, _output_nonlinear_iteration_results, _process_to_pvd_file, ProcessLib::addProcessDataToMesh(), ProcessLib::Output::OutputFile::constructFilename(), DBUG(), BaseLib::RunTime::elapsed(), findPVDFile(), ProcessLib::Process::getDOFTable(), ProcessLib::Process::getIntegrationPointWriter(), ProcessLib::Process::getMesh(), MeshLib::Mesh::getName(), ProcessLib::Process::getProcessVariables(), ProcessLib::Process::getSecondaryVariables(), INFO(), ProcessLib::Process::isMonolithicSchemeUsed(), BaseLib::joinPaths(), ProcessLib::makeOutput(), and BaseLib::RunTime::start().

Referenced by ProcessLib::solveOneTimeStepOneProcess().

◆ findPVDFile()

MeshLib::IO::PVDFile * ProcessLib::Output::findPVDFile ( Process const &  process,
const int  process_id,
std::string const &  mesh_name_for_output 
)
private

Get the address of a PVDFile from corresponding to the given process.

Parameters
processProcess.
process_idProcess ID.
mesh_name_for_outputmesh name for the output.
Returns
Address of a PVDFile.

Definition at line 146 of file Output.cpp.

150 {
151  auto const filename = constructPVDName(
152  _output_directory, _output_file_prefix, mesh_name_for_output);
153  auto range = _process_to_pvd_file.equal_range(&process);
154  int counter = 0;
155  MeshLib::IO::PVDFile* pvd_file = nullptr;
156  for (auto spd_it = range.first; spd_it != range.second; ++spd_it)
157  {
158  if (spd_it->second.pvd_filename == filename)
159  {
160  if (counter == process_id)
161  {
162  pvd_file = &spd_it->second;
163  break;
164  }
165  counter++;
166  }
167  }
168  if (pvd_file == nullptr)
169  {
170  OGS_FATAL(
171  "The given process is not contained in the output configuration. "
172  "Aborting.");
173  }
174 
175  return pvd_file;
176 }

References _output_directory, _output_file_prefix, _process_to_pvd_file, anonymous_namespace{Output.cpp}::constructPVDName(), and OGS_FATAL.

Referenced by doOutputAlways(), and doOutputNonlinearIteration().

◆ getFixedOutputTimes()

std::vector<double> ProcessLib::Output::getFixedOutputTimes ( ) const
inline

Definition at line 82 of file Output.h.

83  {
84  return _fixed_output_times;
85  }

References _fixed_output_times.

◆ outputMesh()

void ProcessLib::Output::outputMesh ( OutputFile const &  output_file,
MeshLib::IO::PVDFile *const  pvd_file,
MeshLib::Mesh const &  mesh,
double const  t 
)
staticprivate

Definition at line 261 of file Output.cpp.

265 {
266  DBUG("output to {:s}", output_file.path);
267 
268  if (output_file.type == OutputType::vtk)
269  {
270  pvd_file->addVTUFile(output_file.name, t);
271  }
272 
273  makeOutput(output_file.path, mesh, output_file.compression,
274  output_file.data_mode);
275 }
void addVTUFile(std::string const &vtu_fname, double timestep)
Add a VTU file to this PVD file.
Definition: PVDFile.cpp:24

References MeshLib::IO::PVDFile::addVTUFile(), ProcessLib::Output::OutputFile::compression, ProcessLib::Output::OutputFile::data_mode, DBUG(), ProcessLib::makeOutput(), ProcessLib::Output::OutputFile::name, ProcessLib::Output::OutputFile::path, ProcessLib::Output::OutputFile::type, and ProcessLib::vtk.

Referenced by doOutputAlways().

◆ outputMeshXdmf()

void ProcessLib::Output::outputMeshXdmf ( OutputFile const &  output_file,
std::vector< std::reference_wrapper< const MeshLib::Mesh >>  meshes,
int const  timestep,
double const  t 
)
private

Definition at line 238 of file Output.cpp.

244 {
245  // \TODO (tm) Refactor to a dedicated VTKOutput and XdmfOutput
246  // The XdmfOutput will create on construction the XdmfHdfWriter
248  {
249  std::filesystem::path path(output_file.path);
250  _mesh_xdmf_hdf_writer = std::make_unique<MeshLib::IO::XdmfHdfWriter>(
251  std::move(meshes), path, timestep, t,
253  output_file.compression, output_file.n_files);
254  }
255  else
256  {
257  _mesh_xdmf_hdf_writer->writeStep(t);
258  };
259 }
std::unique_ptr< MeshLib::IO::XdmfHdfWriter > _mesh_xdmf_hdf_writer
Definition: Output.h:102

References _mesh_xdmf_hdf_writer, _output_data_specification, ProcessLib::Output::OutputFile::compression, ProcessLib::Output::OutputFile::n_files, ProcessLib::OutputDataSpecification::output_variables, and ProcessLib::Output::OutputFile::path.

Referenced by doOutputAlways().

◆ shallDoOutput()

bool ProcessLib::Output::shallDoOutput ( int  timestep,
double const  t 
)
private

Determines if there should be output at the given timestep or t.

Definition at line 61 of file Output.cpp.

62 {
63  auto const fixed_output_time = std::lower_bound(
64  cbegin(_fixed_output_times), cend(_fixed_output_times), t);
65  if ((fixed_output_time != cend(_fixed_output_times)) &&
66  (std::abs(*fixed_output_time - t) <
67  std::numeric_limits<double>::epsilon()))
68  {
69  return true;
70  }
71 
72  int each_steps = 1;
73 
74  for (auto const& pair : _repeats_each_steps)
75  {
76  each_steps = pair.each_steps;
77 
78  if (timestep > pair.repeat * each_steps)
79  {
80  timestep -= pair.repeat * each_steps;
81  }
82  else
83  {
84  break;
85  }
86  }
87 
88  if (timestep % each_steps == 0)
89  {
90  return true;
91  }
92 
93  return false;
94 }

References _fixed_output_times, and _repeats_each_steps.

Referenced by doOutput(), and doOutputLastTimestep().

Member Data Documentation

◆ _fixed_output_times

std::vector<double> const ProcessLib::Output::_fixed_output_times
private

Given times that steps have to reach.

Definition at line 124 of file Output.h.

Referenced by Output(), getFixedOutputTimes(), and shallDoOutput().

◆ _mesh_names_for_output

std::vector<std::string> ProcessLib::Output::_mesh_names_for_output
private

Definition at line 143 of file Output.h.

Referenced by addProcess(), and doOutputAlways().

◆ _mesh_xdmf_hdf_writer

std::unique_ptr<MeshLib::IO::XdmfHdfWriter> ProcessLib::Output::_mesh_xdmf_hdf_writer
private

Definition at line 102 of file Output.h.

Referenced by outputMeshXdmf().

◆ _meshes

std::vector<std::unique_ptr<MeshLib::Mesh> > const& ProcessLib::Output::_meshes
private

Definition at line 144 of file Output.h.

Referenced by doOutputAlways().

◆ _n_files

unsigned int const ProcessLib::Output::_n_files
private

Specifies the number of hdf5 output files.

Definition at line 112 of file Output.h.

Referenced by doOutputAlways().

◆ _output_data_specification

OutputDataSpecification const ProcessLib::Output::_output_data_specification
private

Definition at line 142 of file Output.h.

Referenced by doOutputAlways(), doOutputNonlinearIteration(), and outputMeshXdmf().

◆ _output_directory

std::string const ProcessLib::Output::_output_directory
private

◆ _output_file_compression

bool const ProcessLib::Output::_output_file_compression
private

Enables or disables zlib-compression of the output files.

Definition at line 110 of file Output.h.

Referenced by doOutputAlways(), and doOutputNonlinearIteration().

◆ _output_file_data_mode

int const ProcessLib::Output::_output_file_data_mode
private

Chooses vtk's data mode for output following the enumeration given in the vtkXMLWriter: {Ascii, Binary, Appended}. See vtkXMLWriter documentation http://www.vtk.org/doc/nightly/html/classvtkXMLWriter.html

Definition at line 117 of file Output.h.

Referenced by doOutputAlways(), and doOutputNonlinearIteration().

◆ _output_file_prefix

std::string const ProcessLib::Output::_output_file_prefix
private

Definition at line 106 of file Output.h.

Referenced by addProcess(), doOutputAlways(), doOutputNonlinearIteration(), and findPVDFile().

◆ _output_file_suffix

std::string const ProcessLib::Output::_output_file_suffix
private

Definition at line 107 of file Output.h.

Referenced by doOutputAlways(), and doOutputNonlinearIteration().

◆ _output_file_type

OutputType const ProcessLib::Output::_output_file_type
private

Definition at line 105 of file Output.h.

Referenced by doOutputAlways(), and doOutputNonlinearIteration().

◆ _output_nonlinear_iteration_results

bool const ProcessLib::Output::_output_nonlinear_iteration_results
private

Definition at line 118 of file Output.h.

Referenced by doOutputNonlinearIteration().

◆ _process_to_pvd_file

std::multimap<Process const*, MeshLib::IO::PVDFile> ProcessLib::Output::_process_to_pvd_file
private

Definition at line 126 of file Output.h.

Referenced by addProcess(), doOutputAlways(), doOutputNonlinearIteration(), and findPVDFile().

◆ _repeats_each_steps

std::vector<PairRepeatEachSteps> ProcessLib::Output::_repeats_each_steps
private

Describes after which timesteps to write output.

Definition at line 121 of file Output.h.

Referenced by shallDoOutput().


The documentation for this class was generated from the following files: