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

#include <vtkbaseexportmodule.h>

Inheritance diagram for oofem::VTKBaseExportModule:
Collaboration diagram for oofem::VTKBaseExportModule:

Public Member Functions

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

Static Public Member Functions

static void computeIPAverage (FloatArray &answer, IntegrationRule *iRule, Element *elem, InternalStateType isType, TimeStep *tStep)

Protected Member Functions

virtual void setupVTKPiece (ExportRegion &vtkPiece, TimeStep *tStep, Set &region)
virtual void exportPrimaryVars (ExportRegion &piece, Set &region, IntArray &primaryVarsToExport, NodalRecoveryModel &smoother, TimeStep *tStep)
virtual void exportIntVars (ExportRegion &piece, Set &region, IntArray &internalVarsToExport, NodalRecoveryModel &smoother, TimeStep *tStep)
void exportExternalForces (ExportRegion &piece, int region, TimeStep *tStep)
void exportCellVars (ExportRegion &piece, Set &region, IntArray &cellVarsToExport, TimeStep *tStep)
 Exports cell variables (typically internal variables).
void exportExternalForces (ExportRegion &piece, Set &region, IntArray &externalForcesToExport, TimeStep *tStep)
void exportSetMembership (ExportRegion &piece, Set &region, TimeStep *tStep)
void getNodalVariableFromPrimaryField (FloatArray &answer, DofManager *dman, TimeStep *tStep, UnknownType type, Set &region, NodalRecoveryModel &smoother)
void getNodalVariableFromIS (FloatArray &answer, Node *node, TimeStep *tStep, InternalStateType type, Set &region, NodalRecoveryModel &smoother)
void getCellVariableFromIS (FloatArray &answer, Element *el, InternalStateType type, TimeStep *tStep)
int giveNumberOfNodesPerCell (int cellType)
void giveElementCell (IntArray &answer, Element *elem)
virtual int initRegionNodeNumbering (ExportRegion &vtkPiece, Domain *domain, TimeStep *tStep, Set &region)
bool isElementComposite (Element *elem)
void exportCompositeElement (ExportRegion &vtkPiece, Element *el, TimeStep *tStep)
 Returns true if element geometry type is composite (not a single cell).
void exportCompositeElement (std::vector< ExportRegion > &vtkPieces, Element *el, TimeStep *tStep)
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).

Static Protected Member Functions

static void makeFullTensorForm (FloatArray &answer, const FloatArray &reducedForm, InternalStateValueType vtype)
 Gives the full form of given symmetrically stored tensors, missing components are filled with zeros.

Static Protected Attributes

static IntArray redToFull
 Map from Voigt to full tensor.

Additional Inherited Members

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

Base class for VTK related export modules. Defines commmon methods.

Definition at line 70 of file vtkbaseexportmodule.h.

Constructor & Destructor Documentation

◆ VTKBaseExportModule()

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

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

Definition at line 63 of file vtkbaseexportmodule.C.

References oofem::ExportModule::ExportModule().

◆ ~VTKBaseExportModule()

oofem::VTKBaseExportModule::~VTKBaseExportModule ( )
virtual

Destructor.

Definition at line 66 of file vtkbaseexportmodule.C.

Member Function Documentation

◆ computeIPAverage()

void oofem::VTKBaseExportModule::computeIPAverage ( FloatArray & answer,
IntegrationRule * iRule,
Element * elem,
InternalStateType isType,
TimeStep * tStep )
static

Computes a cell average of an InternalStateType varible based on the weights in the integrationpoints (=> volume/area/length average)

Definition at line 873 of file vtkbaseexportmodule.C.

References oofem::FloatArray::add(), oofem::FloatArray::clear(), oofem::Element::giveIPValue(), and oofem::FloatArray::times().

Referenced by getCellVariableFromIS(), oofem::Shell7BaseXFEM::giveCZExportData(), and oofem::Shell7Base::giveShellExportData().

◆ exportCellVars()

◆ exportCompositeElement() [1/2]

void oofem::VTKBaseExportModule::exportCompositeElement ( ExportRegion & vtkPiece,
Element * el,
TimeStep * tStep )
protected

Returns true if element geometry type is composite (not a single cell).

◆ exportCompositeElement() [2/2]

void oofem::VTKBaseExportModule::exportCompositeElement ( std::vector< ExportRegion > & vtkPieces,
Element * el,
TimeStep * tStep )
protected

◆ exportExternalForces() [1/2]

◆ exportExternalForces() [2/2]

void oofem::VTKBaseExportModule::exportExternalForces ( ExportRegion & piece,
Set & region,
IntArray & externalForcesToExport,
TimeStep * tStep )
protected

Export external forces.

Todo
Add a more flexible solution here, ask the Engineering model for the equivalent to this (perhaps as part of the primary field?) This should be looked into, just as "getNodalVariableFromPrimaryField" is particularly complicated.
Todo
Have some mapping for UnknownType -> DofID array
Todo
Have to make more assumptions here.. we shouldn't assume EModelDefaultEquationNumbering. Do something nicer than extForces and extForcesP instead.

Definition at line 894 of file vtkbaseexportmodule.C.

References oofem::FloatArray::at(), oofem::IntArray::at(), oofem::ExportModule::emodel, oofem::ExportRegion::getMapL2G(), oofem::DofManager::giveDofWithID(), oofem::Dof::giveEquationNumber(), oofem::Domain::giveNode(), oofem::IntArray::giveSize(), OOFEM_WARNING, oofem::ExportRegion::setLoadInNode(), and oofem::ExportRegion::setNumberOfLoadsToExport().

◆ exportIntVars()

◆ exportPrimaryVars()

◆ exportSetMembership()

◆ getCellVariableFromIS()

◆ getNodalVariableFromIS()

◆ getNodalVariableFromPrimaryField()

◆ giveCellType() [1/2]

int oofem::VTKBaseExportModule::giveCellType ( Element * element)

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

Definition at line 104 of file vtkbaseexportmodule.C.

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

Referenced by giveCellType(), giveElementCell(), oofem::QuasicontinuumVTKXMLExportModule::setupVTKPiece(), setupVTKPiece(), oofem::VTKXMLLatticeExportModule::setupVTKPiece(), and oofem::VTKXMLPeriodicExportModule::setupVTKPiece().

◆ giveCellType() [2/2]

int oofem::VTKBaseExportModule::giveCellType ( int num)

Definition at line 148 of file vtkbaseexportmodule.C.

References oofem::ExportModule::emodel, and giveCellType().

◆ giveClassName()

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

◆ giveElementCell()

◆ giveNumberOfNodesPerCell()

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

Returns number of nodes corresponding to cell type

Definition at line 154 of file vtkbaseexportmodule.C.

References OOFEM_ERROR.

Referenced by exportExternalForces(), and giveElementCell().

◆ initialize()

void oofem::VTKBaseExportModule::initialize ( )
overridevirtual

◆ initRegionNodeNumbering()

int oofem::VTKBaseExportModule::initRegionNodeNumbering ( ExportRegion & vtkPiece,
Domain * domain,
TimeStep * tStep,
Set & region )
protectedvirtual

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 number 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.

Reimplemented in oofem::QuasicontinuumVTKXMLExportModule, oofem::VTKXMLLatticeExportModule, and oofem::VTKXMLPeriodicExportModule.

Definition at line 794 of file vtkbaseexportmodule.C.

References oofem::IntArray::at(), oofem::Element_local, oofem::ExportRegion::getMapG2L(), oofem::ExportRegion::getMapL2G(), oofem::Domain::giveElement(), oofem::Set::giveElementList(), oofem::Element::giveNode(), oofem::FEMComponent::giveNumber(), oofem::Domain::giveNumberOfDofManagers(), oofem::Element::giveNumberOfNodes(), oofem::Element::giveParallelMode(), oofem::IntArray::giveSize(), oofem::Element::isActivated(), oofem::Element::isCast(), isElementComposite(), oofem::IntArray::resize(), oofem::ExportRegion::setNumberOfCells(), oofem::ExportRegion::setNumberOfNodes(), and oofem::IntArray::zero().

Referenced by exportExternalForces(), and setupVTKPiece().

◆ isElementComposite()

◆ makeFullTensorForm()

void oofem::VTKBaseExportModule::makeFullTensorForm ( FloatArray & answer,
const FloatArray & reducedForm,
InternalStateValueType vtype )
staticprotected

◆ setupVTKPiece()

◆ terminate()

void oofem::VTKBaseExportModule::terminate ( )
overridevirtual

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

Reimplemented from oofem::ExportModule.

Reimplemented in oofem::VTKHDF5ExportModule, oofem::VTKXMLExportModule, and oofem::VTKXMLXFemExportModule.

Definition at line 76 of file vtkbaseexportmodule.C.

Member Data Documentation

◆ redToFull

IntArray oofem::VTKBaseExportModule::redToFull
staticprotected
Initial value:
= {
1, 5, 9, 8, 7, 4, 6, 3, 2
}

Map from Voigt to full tensor.

Definition at line 74 of file vtkbaseexportmodule.h.

Referenced by makeFullTensorForm().


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