OOFEM 3.0
Loading...
Searching...
No Matches
oofem::VTKExportModule Class Reference

#include <vtkexportmodule.h>

Inheritance diagram for oofem::VTKExportModule:
Collaboration diagram for oofem::VTKExportModule:

Public Member Functions

 VTKExportModule (int n, EngngModel *e)
 Constructor. Creates empty Output Manager with number n. By default all components are selected.
virtual ~VTKExportModule ()
 Destructor.
void initializeFrom (InputRecord &ir) override
 Initializes receiver according to object description stored in input record.
void doOutput (TimeStep *tStep, bool forcedOutput=false) override
void initialize () override
void terminate () override
const char * giveClassName () const override
 Returns class name of the receiver.
const char * giveInputRecordName () const
Public Member Functions inherited from oofem::ExportModule
 ExportModule (int n, EngngModel *e)
 Constructor. Creates empty Output Manager with number n.
virtual ~ExportModule ()
 Destructor.
void doForcedOutput (TimeStep *tStep)
bool testSubStepOutput ()
virtual void initializeElementSet ()

Protected Types

enum  modeType { wdmode , rbrmode }
 Determines how regions should be exported. More...

Protected Member Functions

NodalRecoveryModelgiveSmoother ()
 Returns the internal smoother.
FILE * giveOutputStream (TimeStep *tStep)
 Returns the output stream for given solution step.
int giveCellType (Element *tStep)
int giveNumberOfElementCells (Element *)
int giveNumberOfNodesPerCell (int cellType)
void giveElementCell (IntArray &answer, Element *elem, int cell)
void exportIntVars (FILE *stream, TimeStep *tStep)
void exportPrimaryVars (FILE *stream, TimeStep *tStep)
void exportIntVarAs (InternalStateType valID, InternalStateValueType type, FILE *stream, TimeStep *tStep)
void exportPrimVarAs (UnknownType valID, FILE *stream, TimeStep *tStep)
void exportCellVars (FILE *stream, int elemToProcess, TimeStep *tStep)
int initRegionNodeNumbering (IntArray &regionNodalNumbers, int &regionDofMans, int offset, Domain *domain, int reg, int mode)
int giveTotalRBRNumberOfNodes (Domain *d)
void getDofManPrimaryVariable (FloatArray &answer, DofManager *dman, IntArray &dofIDMask, ValueModeType mode, TimeStep *tStep, InternalStateType iType)
Protected Member Functions inherited from oofem::ExportModule
int giveNumberOfRegions ()
 Returns number of regions (aka regionSets).
SetgiveRegionSet (int i)
 Returns element set.
std::string giveOutputBaseFileName (TimeStep *tStep)
bool testTimeStepOutput (TimeStep *tStep)
bool testDomainOutput (int n)
std::string errorInfo (const char *func) const
 Returns string for prepending output (used by error reporting macros).

Protected Attributes

IntArray internalVarsToExport
 List of InternalStateType values, identifying the selected vars for export.
IntArray primaryVarsToExport
 List of primary unknowns to export.
IntArray cellVarsToExport
 List of cell data to export.
modeType outMode
modeType mode
NodalRecoveryModel::NodalRecoveryModelType stype
 Smoother type.
std::unique_ptr< NodalRecoveryModelsmoother
 Smoother.
IntArray regionsToSkip
 List of regions to skip.
Protected Attributes inherited from oofem::ExportModule
int number
 Component number.
EngngModelemodel
 Problem pointer.
bool tstep_all_out_flag
 Indicates all steps selection.
int tstep_step_out
 User timeStep Output step. Indicates every tstep_step_out-th step selected.
std ::list< Rangetsteps_out
 List of user selected step numbers.
bool tstep_substeps_out_flag
bool domain_all_flag
 Indicates all domains.
IntArray domainMask
 Domain selection mask.
IntArray regionSets
 regions represented by sets
double timeScale
 Scaling time in output, e.g. conversion from seconds to hours.
Set defaultElementSet
 Default region set.
bool pythonExport
 Output is carried out as a python list instead of writing files.

Detailed Description

Represents VTK (Visualization Toolkit) export module. It uses VTK file format, Unstructured grid dataset. There is built in support for Region By Region output, taking care about possible nonsmooth character of some internal variables at region boundaries. This, however, is rather complication and since application of VTK is naturally in 3D, the corresponding sections are commented out.

Definition at line 64 of file vtkexportmodule.h.

Member Enumeration Documentation

◆ modeType

Determines how regions should be exported.

Enumerator
wdmode 

Whole domain.

rbrmode 

Region by region.

Definition at line 75 of file vtkexportmodule.h.

Constructor & Destructor Documentation

◆ VTKExportModule()

oofem::VTKExportModule::VTKExportModule ( int n,
EngngModel * e )

Constructor. Creates empty Output Manager with number n. By default all components are selected.

References doOutput(), initialize(), initializeFrom(), terminate(), and VTKExportModule().

Referenced by VTKExportModule().

◆ ~VTKExportModule()

oofem::VTKExportModule::~VTKExportModule ( )
virtual

Destructor.

Definition at line 72 of file vtkexportmodule.C.

Member Function Documentation

◆ doOutput()

◆ exportCellVars()

◆ exportIntVarAs()

◆ exportIntVars()

void oofem::VTKExportModule::exportIntVars ( FILE * stream,
TimeStep * tStep )
protected

Export internal variables.

Definition at line 371 of file vtkexportmodule.C.

References exportIntVarAs(), oofem::giveInternalStateValueType(), and internalVarsToExport.

Referenced by doOutput().

◆ exportPrimaryVars()

void oofem::VTKExportModule::exportPrimaryVars ( FILE * stream,
TimeStep * tStep )
protected

Export primary variables.

Definition at line 751 of file vtkexportmodule.C.

References exportPrimVarAs(), and primaryVarsToExport.

Referenced by doOutput().

◆ exportPrimVarAs()

◆ getDofManPrimaryVariable()

void oofem::VTKExportModule::getDofManPrimaryVariable ( FloatArray & answer,
DofManager * dman,
IntArray & dofIDMask,
ValueModeType mode,
TimeStep * tStep,
InternalStateType iType )
protected

Returns the value of Primary variable at given dof manager. If such variable not directly available in dofman dofs, can use smoother to recover this nodal value.

recover values if not done before

Definition at line 882 of file vtkexportmodule.C.

References oofem::Set::addAllElements(), oofem::FloatArray::at(), oofem::IntArray::at(), oofem::DofManager::giveDofWithID(), oofem::FEMComponent::giveDomain(), oofem::FEMComponent::giveNumber(), oofem::FloatArray::giveSize(), oofem::IntArray::giveSize(), giveSmoother(), oofem::Dof::giveUnknown(), oofem::DofManager::hasDofID(), mode, OOFEM_WARNING, oofem::FloatArray::resize(), and oofem::FloatArray::zero().

Referenced by exportPrimVarAs().

◆ giveCellType()

int oofem::VTKExportModule::giveCellType ( Element * tStep)
protected

Returns corresponding element cell_type. Some common element types are supported, others can be supported via interface concept.

Definition at line 228 of file vtkexportmodule.C.

References oofem::Element::giveGeometryType(), and OOFEM_ERROR.

Referenced by doOutput().

◆ giveClassName()

const char * oofem::VTKExportModule::giveClassName ( ) const
inlineoverridevirtual

Returns class name of the receiver.

Implements oofem::ExportModule.

Definition at line 101 of file vtkexportmodule.h.

◆ giveElementCell()

void oofem::VTKExportModule::giveElementCell ( IntArray & answer,
Element * elem,
int cell )
protected

◆ giveInputRecordName()

const char * oofem::VTKExportModule::giveInputRecordName ( ) const
inline

Definition at line 102 of file vtkexportmodule.h.

References _IFT_VTKExportModule_Name.

◆ giveNumberOfElementCells()

int oofem::VTKExportModule::giveNumberOfElementCells ( Element * elem)
protected

Returns the number of elements vtk cells.

Definition at line 350 of file vtkexportmodule.C.

References oofem::Element::giveGeometryType(), and OOFEM_ERROR.

Referenced by doOutput().

◆ giveNumberOfNodesPerCell()

int oofem::VTKExportModule::giveNumberOfNodesPerCell ( int cellType)
protected

Returns number of nodes corresponding to cell type.

Definition at line 266 of file vtkexportmodule.C.

References OOFEM_ERROR.

Referenced by doOutput().

◆ giveOutputStream()

FILE * oofem::VTKExportModule::giveOutputStream ( TimeStep * tStep)
protected

Returns the output stream for given solution step.

Definition at line 216 of file vtkexportmodule.C.

References oofem::ExportModule::giveOutputBaseFileName(), and OOFEM_ERROR.

Referenced by doOutput().

◆ giveSmoother()

NodalRecoveryModel * oofem::VTKExportModule::giveSmoother ( )
protected

Returns the internal smoother.

Definition at line 737 of file vtkexportmodule.C.

References oofem::classFactory, oofem::ExportModule::emodel, smoother, and stype.

Referenced by doOutput(), exportIntVarAs(), exportPrimVarAs(), and getDofManPrimaryVariable().

◆ giveTotalRBRNumberOfNodes()

int oofem::VTKExportModule::giveTotalRBRNumberOfNodes ( Domain * d)
protected

Computes total number of nodes (summed Region by Region, nodes on region boundaries are added multiple times.

Definition at line 501 of file vtkexportmodule.C.

References oofem::Element_local, oofem::Domain::giveElements(), and oofem::Domain::giveNumberOfDofManagers().

Referenced by doOutput().

◆ initialize()

void oofem::VTKExportModule::initialize ( )
overridevirtual

Reimplemented from oofem::ExportModule.

Definition at line 203 of file vtkexportmodule.C.

References smoother.

Referenced by VTKExportModule().

◆ initializeFrom()

void oofem::VTKExportModule::initializeFrom ( InputRecord & ir)
overridevirtual

Initializes receiver according to object description stored in input record.

Reimplemented from oofem::ExportModule.

Definition at line 76 of file vtkexportmodule.C.

References _IFT_VTKExportModule_cellvars, _IFT_VTKExportModule_primvars, _IFT_VTKExportModule_stype, _IFT_VTKExportModule_vars, cellVarsToExport, internalVarsToExport, IR_GIVE_OPTIONAL_FIELD, primaryVarsToExport, and stype.

Referenced by VTKExportModule().

◆ initRegionNodeNumbering()

int oofem::VTKExportModule::initRegionNodeNumbering ( IntArray & regionNodalNumbers,
int & regionDofMans,
int offset,
Domain * domain,
int reg,
int mode )
protected

Assembles the region node map. Also computes the total number of nodes in region. The region are numbered starting from offset+1. if mode == 0 then regionNodalNumbers is array with mapping from global numbering to local region numbering. The i-th value contains the corresponding local region number (or zero, if global numbar is not in region). if mode == 1 then regionNodalNumbers is array with mapping from local to global numbering. The i-th value contains the corresponding global node number.

Definition at line 539 of file vtkexportmodule.C.

References oofem::IntArray::at(), oofem::Element_local, oofem::Domain::giveElements(), oofem::Domain::giveNumberOfDofManagers(), mode, oofem::IntArray::resize(), and oofem::IntArray::zero().

Referenced by doOutput(), exportIntVarAs(), and exportPrimVarAs().

◆ terminate()

void oofem::VTKExportModule::terminate ( )
overridevirtual

Terminates the receiver. The terminating messages should be printed. All the streams should be closed.

Reimplemented from oofem::ExportModule.

Definition at line 211 of file vtkexportmodule.C.

Referenced by VTKExportModule().

Member Data Documentation

◆ cellVarsToExport

IntArray oofem::VTKExportModule::cellVarsToExport
protected

List of cell data to export.

Definition at line 72 of file vtkexportmodule.h.

Referenced by doOutput(), exportCellVars(), and initializeFrom().

◆ internalVarsToExport

IntArray oofem::VTKExportModule::internalVarsToExport
protected

List of InternalStateType values, identifying the selected vars for export.

Definition at line 68 of file vtkexportmodule.h.

Referenced by doOutput(), exportIntVars(), and initializeFrom().

◆ mode

modeType oofem::VTKExportModule::mode
protected

Definition at line 81 of file vtkexportmodule.h.

Referenced by getDofManPrimaryVariable(), and initRegionNodeNumbering().

◆ outMode

modeType oofem::VTKExportModule::outMode
protected

Definition at line 80 of file vtkexportmodule.h.

◆ primaryVarsToExport

IntArray oofem::VTKExportModule::primaryVarsToExport
protected

List of primary unknowns to export.

Definition at line 70 of file vtkexportmodule.h.

Referenced by doOutput(), exportPrimaryVars(), and initializeFrom().

◆ regionsToSkip

IntArray oofem::VTKExportModule::regionsToSkip
protected

List of regions to skip.

Definition at line 88 of file vtkexportmodule.h.

◆ smoother

std::unique_ptr<NodalRecoveryModel> oofem::VTKExportModule::smoother
protected

Smoother.

Definition at line 86 of file vtkexportmodule.h.

Referenced by exportIntVarAs(), giveSmoother(), and initialize().

◆ stype

NodalRecoveryModel::NodalRecoveryModelType oofem::VTKExportModule::stype
protected

Smoother type.

Definition at line 84 of file vtkexportmodule.h.

Referenced by giveSmoother(), and initializeFrom().


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

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011