VTK output module for the black oil model's parameters. More...

#include <vtkblackoilmodule.hh>

Inheritance diagram for Opm::VtkBlackOilModule< TypeTag >:
Inheritance graph

Public Types

using VectorBuffer = BaseOutputWriter::VectorBuffer
 
using TensorBuffer = BaseOutputWriter::TensorBuffer
 
using EqBuffer = std::array< ScalarBuffer, numEq >
 
using PhaseBuffer = std::array< ScalarBuffer, numPhases >
 
using ComponentBuffer = std::array< ScalarBuffer, numComponents >
 
using PhaseComponentBuffer = std::array< std::array< ScalarBuffer, numComponents >, numPhases >
 
using PhaseVectorBuffer = std::array< VectorBuffer, numPhases >
 

Public Member Functions

 VtkBlackOilModule (const Simulator &simulator)
 
void allocBuffers ()
 Allocate memory for the scalar fields we would like to write to the VTK file. More...
 
void processElement (const ElementContext &elemCtx)
 Modify the internal buffers according to the intensive quantities relevant for an element. More...
 
void commitBuffers (BaseOutputWriter &baseWriter)
 Add all buffers to the VTK output writer. More...
 
virtual bool needExtensiveQuantities () const
 Returns true iff the module needs to access the extensive quantities of a context to do its job. More...
 

Static Public Member Functions

static void registerParameters ()
 Register all run-time parameters for the multi-phase VTK output module. More...
 

Protected Types

enum  BufferType { DofBuffer , VertexBuffer , ElementBuffer }
 

Protected Member Functions

void resizeScalarBuffer_ (ScalarBuffer &buffer, BufferType bufferType=DofBuffer)
 Allocate the space for a buffer storing a scalar quantity. More...
 
void resizeTensorBuffer_ (TensorBuffer &buffer, BufferType bufferType=DofBuffer)
 Allocate the space for a buffer storing a tensorial quantity. More...
 
void resizeVectorBuffer_ (VectorBuffer &buffer, BufferType bufferType=DofBuffer)
 
void resizeEqBuffer_ (EqBuffer &buffer, BufferType bufferType=DofBuffer)
 Allocate the space for a buffer storing a equation specific quantity. More...
 
void resizePhaseBuffer_ (PhaseBuffer &buffer, BufferType bufferType=DofBuffer)
 Allocate the space for a buffer storing a phase-specific quantity. More...
 
void resizeComponentBuffer_ (ComponentBuffer &buffer, BufferType bufferType=DofBuffer)
 Allocate the space for a buffer storing a component specific quantity. More...
 
void resizePhaseComponentBuffer_ (PhaseComponentBuffer &buffer, BufferType bufferType=DofBuffer)
 Allocate the space for a buffer storing a phase and component specific buffer. More...
 
void commitScalarBuffer_ (BaseOutputWriter &baseWriter, const char *name, ScalarBuffer &buffer, BufferType bufferType=DofBuffer)
 Add a buffer containing scalar quantities to the result file. More...
 
void commitVectorBuffer_ (BaseOutputWriter &baseWriter, const char *name, VectorBuffer &buffer, BufferType bufferType=DofBuffer)
 Add a buffer containing vectorial quantities to the result file. More...
 
void commitTensorBuffer_ (BaseOutputWriter &baseWriter, const char *name, TensorBuffer &buffer, BufferType bufferType=DofBuffer)
 Add a buffer containing tensorial quantities to the result file. More...
 
void commitPriVarsBuffer_ (BaseOutputWriter &baseWriter, const char *pattern, EqBuffer &buffer, BufferType bufferType=DofBuffer)
 Add a buffer with as many variables as PDEs to the result file. More...
 
void commitEqBuffer_ (BaseOutputWriter &baseWriter, const char *pattern, EqBuffer &buffer, BufferType bufferType=DofBuffer)
 Add a buffer with as many variables as PDEs to the result file. More...
 
void commitPhaseBuffer_ (BaseOutputWriter &baseWriter, const char *pattern, PhaseBuffer &buffer, BufferType bufferType=DofBuffer)
 Add a phase-specific buffer to the result file. More...
 
void commitComponentBuffer_ (BaseOutputWriter &baseWriter, const char *pattern, ComponentBuffer &buffer, BufferType bufferType=DofBuffer)
 Add a component-specific buffer to the result file. More...
 
void commitPhaseComponentBuffer_ (BaseOutputWriter &baseWriter, const char *pattern, PhaseComponentBuffer &buffer, BufferType bufferType=DofBuffer)
 Add a phase and component specific quantities to the output. More...
 
void attachScalarElementData_ (BaseOutputWriter &baseWriter, ScalarBuffer &buffer, const char *name)
 
void attachScalarVertexData_ (BaseOutputWriter &baseWriter, ScalarBuffer &buffer, const char *name)
 
void attachVectorElementData_ (BaseOutputWriter &baseWriter, VectorBuffer &buffer, const char *name)
 
void attachVectorVertexData_ (BaseOutputWriter &baseWriter, VectorBuffer &buffer, const char *name)
 
void attachTensorElementData_ (BaseOutputWriter &baseWriter, TensorBuffer &buffer, const char *name)
 
void attachTensorVertexData_ (BaseOutputWriter &baseWriter, TensorBuffer &buffer, const char *name)
 
std::size_t getBufferSize (BufferType bufferType) const
 

Protected Attributes

const Simulator & simulator_
 

Detailed Description

template<class TypeTag>
class Opm::VtkBlackOilModule< TypeTag >

VTK output module for the black oil model's parameters.

Member Typedef Documentation

◆ ComponentBuffer

template<class TypeTag >
using Opm::BaseOutputModule< TypeTag >::ComponentBuffer = std::array<ScalarBuffer, numComponents>
inherited

◆ EqBuffer

template<class TypeTag >
using Opm::BaseOutputModule< TypeTag >::EqBuffer = std::array<ScalarBuffer, numEq>
inherited

◆ PhaseBuffer

template<class TypeTag >
using Opm::BaseOutputModule< TypeTag >::PhaseBuffer = std::array<ScalarBuffer, numPhases>
inherited

◆ PhaseComponentBuffer

template<class TypeTag >
using Opm::BaseOutputModule< TypeTag >::PhaseComponentBuffer = std::array<std::array<ScalarBuffer, numComponents>, numPhases>
inherited

◆ PhaseVectorBuffer

template<class TypeTag >
using Opm::BaseOutputModule< TypeTag >::PhaseVectorBuffer = std::array<VectorBuffer, numPhases>
inherited

◆ TensorBuffer

template<class TypeTag >
using Opm::BaseOutputModule< TypeTag >::TensorBuffer = BaseOutputWriter::TensorBuffer
inherited

◆ VectorBuffer

template<class TypeTag >
using Opm::BaseOutputModule< TypeTag >::VectorBuffer = BaseOutputWriter::VectorBuffer
inherited

Member Enumeration Documentation

◆ BufferType

template<class TypeTag >
enum Opm::BaseOutputModule::BufferType
protectedinherited
Enumerator
DofBuffer 

Buffer contains data associated with the degrees of freedom.

VertexBuffer 

Buffer contains data associated with the grid's vertices.

ElementBuffer 

Buffer contains data associated with the grid's elements.

Constructor & Destructor Documentation

◆ VtkBlackOilModule()

template<class TypeTag >
Opm::VtkBlackOilModule< TypeTag >::VtkBlackOilModule ( const Simulator &  simulator)
inline

Member Function Documentation

◆ allocBuffers()

template<class TypeTag >
void Opm::VtkBlackOilModule< TypeTag >::allocBuffers ( )
inlinevirtual

Allocate memory for the scalar fields we would like to write to the VTK file.

Implements Opm::BaseOutputModule< TypeTag >.

References Opm::BaseOutputModule< TypeTag >::resizeScalarBuffer_().

◆ attachScalarElementData_()

template<class TypeTag >
void Opm::BaseOutputModule< TypeTag >::attachScalarElementData_ ( BaseOutputWriter baseWriter,
ScalarBuffer buffer,
const char *  name 
)
inlineprotectedinherited

◆ attachScalarVertexData_()

template<class TypeTag >
void Opm::BaseOutputModule< TypeTag >::attachScalarVertexData_ ( BaseOutputWriter baseWriter,
ScalarBuffer buffer,
const char *  name 
)
inlineprotectedinherited

◆ attachTensorElementData_()

template<class TypeTag >
void Opm::BaseOutputModule< TypeTag >::attachTensorElementData_ ( BaseOutputWriter baseWriter,
TensorBuffer buffer,
const char *  name 
)
inlineprotectedinherited

◆ attachTensorVertexData_()

template<class TypeTag >
void Opm::BaseOutputModule< TypeTag >::attachTensorVertexData_ ( BaseOutputWriter baseWriter,
TensorBuffer buffer,
const char *  name 
)
inlineprotectedinherited

◆ attachVectorElementData_()

template<class TypeTag >
void Opm::BaseOutputModule< TypeTag >::attachVectorElementData_ ( BaseOutputWriter baseWriter,
VectorBuffer buffer,
const char *  name 
)
inlineprotectedinherited

◆ attachVectorVertexData_()

template<class TypeTag >
void Opm::BaseOutputModule< TypeTag >::attachVectorVertexData_ ( BaseOutputWriter baseWriter,
VectorBuffer buffer,
const char *  name 
)
inlineprotectedinherited

◆ commitBuffers()

template<class TypeTag >
void Opm::VtkBlackOilModule< TypeTag >::commitBuffers ( BaseOutputWriter baseWriter)
inlinevirtual

Add all buffers to the VTK output writer.

Implements Opm::BaseOutputModule< TypeTag >.

References Opm::BaseOutputModule< TypeTag >::commitScalarBuffer_().

◆ commitComponentBuffer_()

template<class TypeTag >
void Opm::BaseOutputModule< TypeTag >::commitComponentBuffer_ ( BaseOutputWriter baseWriter,
const char *  pattern,
ComponentBuffer buffer,
BufferType  bufferType = DofBuffer 
)
inlineprotectedinherited

◆ commitEqBuffer_()

template<class TypeTag >
void Opm::BaseOutputModule< TypeTag >::commitEqBuffer_ ( BaseOutputWriter baseWriter,
const char *  pattern,
EqBuffer buffer,
BufferType  bufferType = DofBuffer 
)
inlineprotectedinherited

Add a buffer with as many variables as PDEs to the result file.

◆ commitPhaseBuffer_()

◆ commitPhaseComponentBuffer_()

template<class TypeTag >
void Opm::BaseOutputModule< TypeTag >::commitPhaseComponentBuffer_ ( BaseOutputWriter baseWriter,
const char *  pattern,
PhaseComponentBuffer buffer,
BufferType  bufferType = DofBuffer 
)
inlineprotectedinherited

◆ commitPriVarsBuffer_()

template<class TypeTag >
void Opm::BaseOutputModule< TypeTag >::commitPriVarsBuffer_ ( BaseOutputWriter baseWriter,
const char *  pattern,
EqBuffer buffer,
BufferType  bufferType = DofBuffer 
)
inlineprotectedinherited

◆ commitScalarBuffer_()

◆ commitTensorBuffer_()

template<class TypeTag >
void Opm::BaseOutputModule< TypeTag >::commitTensorBuffer_ ( BaseOutputWriter baseWriter,
const char *  name,
TensorBuffer buffer,
BufferType  bufferType = DofBuffer 
)
inlineprotectedinherited

◆ commitVectorBuffer_()

template<class TypeTag >
void Opm::BaseOutputModule< TypeTag >::commitVectorBuffer_ ( BaseOutputWriter baseWriter,
const char *  name,
VectorBuffer buffer,
BufferType  bufferType = DofBuffer 
)
inlineprotectedinherited

◆ getBufferSize()

◆ needExtensiveQuantities()

template<class TypeTag >
virtual bool Opm::BaseOutputModule< TypeTag >::needExtensiveQuantities ( ) const
inlinevirtualinherited

Returns true iff the module needs to access the extensive quantities of a context to do its job.

For example, this happens if velocities or gradients should be written.

Always returning true here does not do any harm from the correctness perspective, but it slows down writing the output fields. Since most output modules only write intensive quantities, this method returns 'false' by default.

Reimplemented in Opm::VtkMultiPhaseModule< TypeTag >.

◆ processElement()

template<class TypeTag >
void Opm::VtkBlackOilModule< TypeTag >::processElement ( const ElementContext &  elemCtx)
inlinevirtual

Modify the internal buffers according to the intensive quantities relevant for an element.

Implements Opm::BaseOutputModule< TypeTag >.

◆ registerParameters()

template<class TypeTag >
static void Opm::VtkBlackOilModule< TypeTag >::registerParameters ( )
inlinestatic

Register all run-time parameters for the multi-phase VTK output module.

Referenced by Opm::BlackOilModel< TypeTag >::registerParameters().

◆ resizeComponentBuffer_()

template<class TypeTag >
void Opm::BaseOutputModule< TypeTag >::resizeComponentBuffer_ ( ComponentBuffer buffer,
BufferType  bufferType = DofBuffer 
)
inlineprotectedinherited

Allocate the space for a buffer storing a component specific quantity.

References Opm::BaseOutputModule< TypeTag >::getBufferSize().

Referenced by Opm::VtkCompositionModule< TypeTag >::allocBuffers(), and Opm::VtkPTFlashModule< TypeTag >::allocBuffers().

◆ resizeEqBuffer_()

template<class TypeTag >
void Opm::BaseOutputModule< TypeTag >::resizeEqBuffer_ ( EqBuffer buffer,
BufferType  bufferType = DofBuffer 
)
inlineprotectedinherited

Allocate the space for a buffer storing a equation specific quantity.

References Opm::BaseOutputModule< TypeTag >::getBufferSize().

Referenced by Opm::VtkPrimaryVarsModule< TypeTag >::allocBuffers().

◆ resizePhaseBuffer_()

◆ resizePhaseComponentBuffer_()

template<class TypeTag >
void Opm::BaseOutputModule< TypeTag >::resizePhaseComponentBuffer_ ( PhaseComponentBuffer buffer,
BufferType  bufferType = DofBuffer 
)
inlineprotectedinherited

Allocate the space for a buffer storing a phase and component specific buffer.

References Opm::BaseOutputModule< TypeTag >::getBufferSize().

Referenced by Opm::VtkCompositionModule< TypeTag >::allocBuffers(), and Opm::VtkDiffusionModule< TypeTag >::allocBuffers().

◆ resizeScalarBuffer_()

◆ resizeTensorBuffer_()

template<class TypeTag >
void Opm::BaseOutputModule< TypeTag >::resizeTensorBuffer_ ( TensorBuffer buffer,
BufferType  bufferType = DofBuffer 
)
inlineprotectedinherited

Allocate the space for a buffer storing a tensorial quantity.

References Opm::BaseOutputModule< TypeTag >::getBufferSize().

Referenced by Opm::VtkMultiPhaseModule< TypeTag >::allocBuffers().

◆ resizeVectorBuffer_()

template<class TypeTag >
void Opm::BaseOutputModule< TypeTag >::resizeVectorBuffer_ ( VectorBuffer buffer,
BufferType  bufferType = DofBuffer 
)
inlineprotectedinherited

Member Data Documentation

◆ simulator_


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