|
OOFEM 3.0
|
#include <vtkexportmodule.h>
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 | |
| NodalRecoveryModel * | giveSmoother () |
| 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 ®ionNodalNumbers, int ®ionDofMans, 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). | |
| Set * | giveRegionSet (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< NodalRecoveryModel > | smoother |
| Smoother. | |
| IntArray | regionsToSkip |
| List of regions to skip. | |
| Protected Attributes inherited from oofem::ExportModule | |
| int | number |
| Component number. | |
| EngngModel * | emodel |
| 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< Range > | tsteps_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. | |
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.
|
protected |
Determines how regions should be exported.
| Enumerator | |
|---|---|
| wdmode | Whole domain. |
| rbrmode | Region by region. |
Definition at line 75 of file vtkexportmodule.h.
| 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().
|
virtual |
Destructor.
Definition at line 72 of file vtkexportmodule.C.
|
overridevirtual |
Writes the output. Abstract service.
| tStep | Time step. |
| forcedOutput | If true, no testTimeStepOutput should be done. |
Implements oofem::ExportModule.
Definition at line 93 of file vtkexportmodule.C.
References oofem::IntArray::at(), cellVarsToExport, oofem::Element_local, oofem::ExportModule::emodel, exportCellVars(), exportIntVars(), exportPrimaryVars(), giveCellType(), oofem::DofManager::giveCoordinates(), giveElementCell(), oofem::Domain::giveElements(), oofem::Domain::giveNode(), oofem::Domain::giveNumberOfDofManagers(), giveNumberOfElementCells(), giveNumberOfNodesPerCell(), giveOutputStream(), giveSmoother(), oofem::TimeStep::giveTargetTime(), giveTotalRBRNumberOfNodes(), initRegionNodeNumbering(), internalVarsToExport, OOFEM_LOG_DEBUG, primaryVarsToExport, and oofem::ExportModule::testTimeStepOutput().
Referenced by VTKExportModule().
|
protected |
Export variables defined on cells.
Definition at line 392 of file vtkexportmodule.C.
References oofem::__InternalStateTypeToString(), oofem::FloatArray::add(), oofem::FloatArray::at(), oofem::FloatMatrix::at(), cellVarsToExport, oofem::FloatArray::clear(), oofem::Element_local, oofem::ExportModule::emodel, oofem::Domain::giveElement(), oofem::Domain::giveElements(), oofem::giveInternalStateValueType(), oofem::Element::giveIPValue(), oofem::FloatArray::giveSize(), oofem::ISVT_SCALAR, oofem::ISVT_TENSOR_G, oofem::ISVT_TENSOR_S3, oofem::ISVT_TENSOR_S3E, oofem::ISVT_VECTOR, OOFEM_ERROR, OOFEM_WARNING, oofem::FloatMatrix::resize(), oofem::FloatArray::times(), and oofem::FloatMatrix::zero().
Referenced by doOutput().
|
protected |
Exports single variable.
Definition at line 602 of file vtkexportmodule.C.
References oofem::__InternalStateTypeToString(), oofem::Set::addAllElements(), oofem::FloatArray::at(), oofem::FloatMatrix::at(), oofem::IntArray::at(), oofem::ExportModule::emodel, oofem::DofManager::giveCoordinate(), oofem::giveInternalStateTypeSize(), oofem::MaterialInterface::giveNodalScalarRepresentation(), oofem::Domain::giveNode(), oofem::Domain::giveNumberOfDofManagers(), oofem::FloatArray::giveSize(), giveSmoother(), oofem::Node::giveUpdatedCoordinate(), initRegionNodeNumbering(), oofem::ISVT_SCALAR, oofem::ISVT_TENSOR_G, oofem::ISVT_TENSOR_S3, oofem::ISVT_TENSOR_S3E, oofem::ISVT_VECTOR, oofem::min(), oofem::FloatArray::resize(), smoother, oofem::FloatArray::zero(), and oofem::FloatMatrix::zero().
Referenced by exportIntVars().
|
protected |
Export internal variables.
Definition at line 371 of file vtkexportmodule.C.
References exportIntVarAs(), oofem::giveInternalStateValueType(), and internalVarsToExport.
Referenced by doOutput().
|
protected |
Export primary variables.
Definition at line 751 of file vtkexportmodule.C.
References exportPrimVarAs(), and primaryVarsToExport.
Referenced by doOutput().
|
protected |
Exports single variable.
Definition at line 761 of file vtkexportmodule.C.
References oofem::__UnknownTypeToString(), oofem::FloatArray::at(), oofem::IntArray::at(), oofem::FloatArray::beTProductOf(), oofem::ExportModule::emodel, getDofManPrimaryVariable(), oofem::Node::giveLocalCoordinateTriplet(), oofem::Domain::giveNode(), oofem::FEMComponent::giveNumber(), oofem::Domain::giveNumberOfDofManagers(), oofem::FloatArray::giveSize(), giveSmoother(), oofem::Node::hasLocalCS(), initRegionNodeNumbering(), oofem::ISVT_SCALAR, oofem::ISVT_UNDEFINED, oofem::ISVT_VECTOR, oofem::min(), OOFEM_ERROR, oofem::FloatArray::resize(), and oofem::FloatArray::zero().
Referenced by exportPrimaryVars().
|
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().
|
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().
|
inlineoverridevirtual |
Returns class name of the receiver.
Implements oofem::ExportModule.
Definition at line 101 of file vtkexportmodule.h.
|
protected |
Returns the element cell geometry.
Definition at line 309 of file vtkexportmodule.C.
References oofem::IntArray::at(), oofem::Element::giveGeometryType(), oofem::Element::giveNode(), oofem::FEMComponent::giveNumber(), oofem::Element::giveNumberOfNodes(), OOFEM_ERROR, and oofem::IntArray::resize().
Referenced by doOutput().
|
inline |
Definition at line 102 of file vtkexportmodule.h.
References _IFT_VTKExportModule_Name.
|
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().
|
protected |
Returns number of nodes corresponding to cell type.
Definition at line 266 of file vtkexportmodule.C.
References OOFEM_ERROR.
Referenced by doOutput().
|
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().
|
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().
|
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().
|
overridevirtual |
Reimplemented from oofem::ExportModule.
Definition at line 203 of file vtkexportmodule.C.
References smoother.
Referenced by VTKExportModule().
|
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().
|
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().
|
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().
|
protected |
List of cell data to export.
Definition at line 72 of file vtkexportmodule.h.
Referenced by doOutput(), exportCellVars(), and initializeFrom().
|
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().
|
protected |
Definition at line 81 of file vtkexportmodule.h.
Referenced by getDofManPrimaryVariable(), and initRegionNodeNumbering().
|
protected |
Definition at line 80 of file vtkexportmodule.h.
|
protected |
List of primary unknowns to export.
Definition at line 70 of file vtkexportmodule.h.
Referenced by doOutput(), exportPrimaryVars(), and initializeFrom().
|
protected |
List of regions to skip.
Definition at line 88 of file vtkexportmodule.h.
|
protected |
Smoother.
Definition at line 86 of file vtkexportmodule.h.
Referenced by exportIntVarAs(), giveSmoother(), and initialize().
|
protected |
Smoother type.
Definition at line 84 of file vtkexportmodule.h.
Referenced by giveSmoother(), and initializeFrom().