28#ifndef EWOMS_FV_BASE_NEWTON_CONVERGENCE_WRITER_HH
29#define EWOMS_FV_BASE_NEWTON_CONVERGENCE_WRITER_HH
37namespace Opm::Properties {
40template<
class TypeTag,
class MyTypeTag>
42template<
class TypeTag,
class MyTypeTag>
44template<
class TypeTag,
class MyTypeTag>
46template<
class TypeTag,
class MyTypeTag>
47struct VtkOutputFormat;
59template <
class TypeTag>
60class FvBaseNewtonConvergenceWriter
62 using GridView = GetPropType<TypeTag, Properties::GridView>;
64 using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>;
65 using GlobalEqVector = GetPropType<TypeTag, Properties::GlobalEqVector>;
66 using NewtonMethod = GetPropType<TypeTag, Properties::NewtonMethod>;
72 FvBaseNewtonConvergenceWriter(NewtonMethod& nm)
80 ~FvBaseNewtonConvergenceWriter()
81 {
delete vtkMultiWriter_; }
100 if (!vtkMultiWriter_)
103 newtonMethod_.problem().gridView(),
104 newtonMethod_.problem().outputDir(),
106 vtkMultiWriter_->
beginWrite(timeStepIdx_ + iteration_ / 100.0);
119 const GlobalEqVector& deltaU)
122 newtonMethod_.problem().model().addConvergenceVtkFields(*vtkMultiWriter_,
127 std::cout <<
"Oops: exception thrown on rank "
128 << newtonMethod_.problem().gridView().comm().rank()
129 <<
" while writing the convergence\n" << std::flush;
void writeFields(const SolutionVector &uLastIter, const GlobalEqVector &deltaU)
Write the Newton update to disk.
Definition fvbasenewtonconvergencewriter.hh:118
void beginTimeStep()
Called by the Newton method before the actual algorithm is started for any given timestep.
Definition fvbasenewtonconvergencewriter.hh:87
void endTimeStep()
Called by the Newton method after Newton algorithm has been completed for any given timestep.
Definition fvbasenewtonconvergencewriter.hh:147
void beginIteration()
Called by the Newton method before an iteration of the Newton algorithm is started.
Definition fvbasenewtonconvergencewriter.hh:97
void endIteration()
Called by the Newton method after an iteration of the Newton algorithm has been completed.
Definition fvbasenewtonconvergencewriter.hh:137
The multi-dimensional Newton method.
Definition newtonmethod.hh:92
Simplifies writing multi-file VTK datasets.
Definition vtkmultiwriter.hh:66
void endWrite(bool onlyDiscard=false)
Finalizes the current writer.
Definition vtkmultiwriter.hh:389
void beginWrite(double t)
Called whenever a new time step must be written.
Definition vtkmultiwriter.hh:179
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilboundaryratevector.hh:37
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242
The Opm property system, traits with inheritance.
Simplifies writing multi-file VTK datasets.