25#ifndef VTK_TPSA_MODULE_HPP
26#define VTK_TPSA_MODULE_HPP
28#include <opm/material/densead/Math.hpp>
32#include <opm/models/io/vtktpsaparams.hpp>
33#include <opm/models/tpsa/tpsabaseproperties.hpp>
45template <
class TypeTag>
48 using ParentType = BaseOutputModule<TypeTag>;
60 using ScalarBuffer =
typename ParentType::ScalarBuffer;
61 using VectorBuffer =
typename ParentType::VectorBuffer;
70 : ParentType(simulator)
73 if constexpr(enableMech) {
83 if constexpr(enableMech) {
99 if constexpr(enableMech) {
101 if (params_.displacementOutput_) {
102 this->resizeVectorBuffer_(displacement_, BufferType::Dof);
106 if (params_.rotationOutput_) {
107 this->resizeVectorBuffer_(rotation_, BufferType::Dof);
111 if (params_.solidPressureOutput_) {
129 if constexpr(enableMech) {
131 const auto& problem = elemCtx.problem();
132 const auto& geoMechModel = problem.geoMechModel();
133 for (
unsigned dofIdx = 0; dofIdx < elemCtx.numPrimaryDof(0); ++dofIdx) {
134 const unsigned globalDofIdx = elemCtx.globalSpaceIndex(dofIdx, 0);
135 const auto& materialState = geoMechModel.materialState(globalDofIdx, 0);
138 for (
int dirIdx = 0; dirIdx < 3; ++dirIdx) {
140 if (params_.displacementOutput_) {
141 displacement_[globalDofIdx][dirIdx] = scalarValue(materialState.displacement(dirIdx));
145 if (params_.rotationOutput_) {
146 rotation_[globalDofIdx][dirIdx] = scalarValue(materialState.rotation(dirIdx));
151 if (params_.solidPressureOutput_) {
152 solidPres_[globalDofIdx] = scalarValue(materialState.solidPressure());
166 if (!
dynamic_cast<VtkMultiWriter*
>(&baseWriter)) {
170 if constexpr(enableMech) {
172 if (params_.displacementOutput_) {
177 if (params_.rotationOutput_) {
182 if (params_.solidPressureOutput_) {
191 VectorBuffer displacement_{};
192 VectorBuffer rotation_{};
193 ScalarBuffer solidPres_{};
The base class for writer modules.
void resizeScalarBuffer_(ScalarBuffer &buffer, BufferType bufferType)
Allocate the space for a buffer storing a scalar quantity.
Definition baseoutputmodule.hh:157
void commitVectorBuffer_(BaseOutputWriter &baseWriter, const char *name, VectorBuffer &buffer, BufferType bufferType)
Add a buffer containing vectorial quantities to the result file.
Definition baseoutputmodule.hh:260
BufferType
Definition baseoutputmodule.hh:143
void commitScalarBuffer_(BaseOutputWriter &baseWriter, const char *name, ScalarBuffer &buffer, BufferType bufferType)
Add a buffer containing scalar quantities to the result file.
Definition baseoutputmodule.hh:238
The base class for all output writers.
Definition baseoutputwriter.hh:46
Simplifies writing multi-file VTK datasets.
Definition vtkmultiwriter.hh:65
static void registerParameters()
Register runtime parameters.
Definition vtktpsamodule.hpp:81
void allocBuffers() override
Allocate memory for output.
Definition vtktpsamodule.hpp:91
VtkTpsaModule(const Simulator &simulator)
Constructor.
Definition vtktpsamodule.hpp:69
void commitBuffers(BaseOutputWriter &baseWriter) override
Add buffers to VTK writer.
Definition vtktpsamodule.hpp:163
void processElement(const ElementContext &elemCtx) override
Assign quantities to output buffers.
Definition vtktpsamodule.hpp:122
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:45
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition propertysystem.hh:233
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:240
This file provides the infrastructure to retrieve run-time parameters.
auto Get(bool errorIfNotRegistered=true)
Retrieve a runtime parameter.
Definition parametersystem.hpp:187
The Opm property system, traits with inheritance.
Parameters for VtkTpsaOutputModule.
Definition vtktpsaparams.hpp:44
static void registerParameters()
Register runtime parameters.
Definition vtktpsaparams.cpp:34
Simplifies writing multi-file VTK datasets.