OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::VTKExportModule Class Reference

Represents VTK (Visualization Toolkit) export module. More...

#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. More...
 
virtual ~VTKExportModule ()
 Destructor. More...
 
virtual IRResultType initializeFrom (InputRecord *ir)
 Initializes receiver according to object description stored in input record. More...
 
virtual void doOutput (TimeStep *tStep, bool forcedOutput=false)
 Writes the output. More...
 
virtual void initialize ()
 
virtual void terminate ()
 Terminates the receiver. More...
 
virtual const char * giveClassName () const
 Returns class name of the receiver. More...
 
virtual const char * giveInputRecordName () const
 
- Public Member Functions inherited from oofem::ExportModule
 ExportModule (int n, EngngModel *e)
 Constructor. Creates empty Output Manager with number n. More...
 
virtual ~ExportModule ()
 Destructor. More...
 
void doForcedOutput (TimeStep *tStep)
 Writes the output. More...
 
bool testSubStepOutput ()
 Initializes receiver. More...
 
virtual void initializeElementSet ()
 Fill regionSets with all elements if regionSets is initially empty. More...
 

Protected Types

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

Protected Member Functions

NodalRecoveryModelgiveSmoother ()
 Returns the internal smoother. More...
 
FILE * giveOutputStream (TimeStep *tStep)
 Returns the output stream for given solution step. More...
 
int giveCellType (Element *tStep)
 Returns corresponding element cell_type. More...
 
int giveNumberOfElementCells (Element *)
 Returns the number of elements vtk cells. More...
 
int giveNumberOfNodesPerCell (int cellType)
 Returns number of nodes corresponding to cell type. More...
 
void giveElementCell (IntArray &answer, Element *elem, int cell)
 Returns the element cell geometry. More...
 
void exportIntVars (FILE *stream, TimeStep *tStep)
 Export internal variables. More...
 
void exportPrimaryVars (FILE *stream, TimeStep *tStep)
 Export primary variables. More...
 
void exportIntVarAs (InternalStateType valID, InternalStateValueType type, FILE *stream, TimeStep *tStep)
 Exports single variable. More...
 
void exportPrimVarAs (UnknownType valID, FILE *stream, TimeStep *tStep)
 Exports single variable. More...
 
void exportCellVars (FILE *stream, int elemToProcess, TimeStep *tStep)
 Export variables defined on cells. More...
 
int initRegionNodeNumbering (IntArray &regionNodalNumbers, int &regionDofMans, int offset, Domain *domain, int reg, int mode)
 Assembles the region node map. More...
 
int giveTotalRBRNumberOfNodes (Domain *d)
 Computes total number of nodes (summed Region by Region, nodes on region boundaries are added multiple times. More...
 
void getDofManPrimaryVariable (FloatArray &answer, DofManager *dman, IntArray &dofIDMask, ValueModeType mode, TimeStep *tStep, InternalStateType iType)
 Returns the value of Primary variable at given dof manager. More...
 
- Protected Member Functions inherited from oofem::ExportModule
int giveNumberOfRegions ()
 Returns number of regions (aka regionSets) More...
 
SetgiveRegionSet (int i)
 Returns element set. More...
 
std::string giveOutputBaseFileName (TimeStep *tStep)
 Gives the appropriate name (minus specific file extension). More...
 
bool testTimeStepOutput (TimeStep *tStep)
 Tests if given time step output is required. More...
 
bool testDomainOutput (int n)
 Test if domain output is required. More...
 
std::string errorInfo (const char *func) const
 Returns string for prepending output (used by error reporting macros). More...
 

Protected Attributes

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

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

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

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

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

oofem::VTKExportModule::~VTKExportModule ( )
virtual

Destructor.

Definition at line 75 of file vtkexportmodule.C.

References smoother.

Member Function Documentation

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

Export primary variables.

Definition at line 764 of file vtkexportmodule.C.

References exportPrimVarAs(), and primaryVarsToExport.

Referenced by doOutput().

void oofem::VTKExportModule::getDofManPrimaryVariable ( FloatArray answer,
DofManager dman,
IntArray dofIDMask,
ValueModeType  mode,
TimeStep tStep,
InternalStateType  iType 
)
protected
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 241 of file vtkexportmodule.C.

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

Referenced by doOutput().

virtual const char* oofem::VTKExportModule::giveClassName ( ) const
inlinevirtual

Returns class name of the receiver.

Implements oofem::ExportModule.

Definition at line 101 of file vtkexportmodule.h.

void oofem::VTKExportModule::giveElementCell ( IntArray answer,
Element elem,
int  cell 
)
protected
virtual const char* oofem::VTKExportModule::giveInputRecordName ( ) const
inlinevirtual

Definition at line 102 of file vtkexportmodule.h.

References _IFT_VTKExportModule_Name.

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

Returns the number of elements vtk cells.

Definition at line 363 of file vtkexportmodule.C.

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

Referenced by doOutput().

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

Returns number of nodes corresponding to cell type.

Definition at line 279 of file vtkexportmodule.C.

References OOFEM_ERROR.

Referenced by doOutput().

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

Returns the output stream for given solution step.

Definition at line 229 of file vtkexportmodule.C.

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

Referenced by doOutput().

NodalRecoveryModel * oofem::VTKExportModule::giveSmoother ( )
protected
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 514 of file vtkexportmodule.C.

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

Referenced by doOutput().

void oofem::VTKExportModule::initialize ( )
virtual

Reimplemented from oofem::ExportModule.

Definition at line 213 of file vtkexportmodule.C.

References oofem::ExportModule::initialize(), and smoother.

IRResultType oofem::VTKExportModule::initializeFrom ( InputRecord ir)
virtual
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 552 of file vtkexportmodule.C.

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

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

void oofem::VTKExportModule::terminate ( )
virtual

Terminates the receiver.

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

Reimplemented from oofem::ExportModule.

Definition at line 224 of file vtkexportmodule.C.

Member Data Documentation

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().

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().

modeType oofem::VTKExportModule::mode
protected

Definition at line 81 of file vtkexportmodule.h.

modeType oofem::VTKExportModule::outMode
protected

Definition at line 80 of file vtkexportmodule.h.

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().

IntArray oofem::VTKExportModule::regionsToSkip
protected

List of regions to skip.

Definition at line 88 of file vtkexportmodule.h.

NodalRecoveryModel* oofem::VTKExportModule::smoother
protected

Smoother.

Definition at line 86 of file vtkexportmodule.h.

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

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 documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:43 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011