OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
vtkexportmodule.h
Go to the documentation of this file.
1 /*
2  *
3  * ##### ##### ###### ###### ### ###
4  * ## ## ## ## ## ## ## ### ##
5  * ## ## ## ## #### #### ## # ##
6  * ## ## ## ## ## ## ## ##
7  * ## ## ## ## ## ## ## ##
8  * ##### ##### ## ###### ## ##
9  *
10  *
11  * OOFEM : Object Oriented Finite Element Code
12  *
13  * Copyright (C) 1993 - 2013 Borek Patzak
14  *
15  *
16  *
17  * Czech Technical University, Faculty of Civil Engineering,
18  * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19  *
20  * This library is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU Lesser General Public
22  * License as published by the Free Software Foundation; either
23  * version 2.1 of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28  * Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public
31  * License along with this library; if not, write to the Free Software
32  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33  */
34 
35 #ifndef vtkexportmodule_h
36 #define vtkexportmodule_h
37 
38 #include "exportmodule.h"
39 #include "intarray.h"
40 #include "nodalrecoverymodel.h"
41 #include "internalstatevaluetype.h"
42 #include "unknowntype.h"
43 #include "valuemodetype.h"
44 
46 
47 #define _IFT_VTKExportModule_Name "vtk"
48 #define _IFT_VTKExportModule_cellvars "cellvars"
49 #define _IFT_VTKExportModule_vars "vars"
50 #define _IFT_VTKExportModule_primvars "primvars"
51 #define _IFT_VTKExportModule_stype "stype"
52 #define _IFT_VTKExportModule_regionstoskip "regionstoskip"
53 
54 
55 namespace oofem {
56 class DofManager;
57 
64 class OOFEM_EXPORT VTKExportModule : public ExportModule
65 {
66 protected:
73 
75  enum modeType {
77  rbrmode
78  };
79 
82 
89 
90 public:
92  VTKExportModule(int n, EngngModel * e);
94  virtual ~VTKExportModule();
95 
96  virtual IRResultType initializeFrom(InputRecord *ir);
97 
98  virtual void doOutput(TimeStep *tStep, bool forcedOutput = false);
99  virtual void initialize();
100  virtual void terminate();
101  virtual const char *giveClassName() const { return "VTKExportModule"; }
102  virtual const char *giveInputRecordName() const { return _IFT_VTKExportModule_Name; }
103 
104 protected:
106  NodalRecoveryModel *giveSmoother();
107 
109  FILE *giveOutputStream(TimeStep *tStep);
114  int giveCellType(Element *tStep);
118  int giveNumberOfElementCells(Element *);
122  int giveNumberOfNodesPerCell(int cellType);
126  void giveElementCell(IntArray &answer, Element *elem, int cell);
130  void exportIntVars(FILE *stream, TimeStep *tStep);
134  void exportPrimaryVars(FILE *stream, TimeStep *tStep);
138  void exportIntVarAs(InternalStateType valID, InternalStateValueType type, FILE *stream, TimeStep *tStep);
142  void exportPrimVarAs(UnknownType valID, FILE *stream, TimeStep *tStep);
146  void exportCellVars(FILE *stream, int elemToProcess, TimeStep *tStep);
147 
156  int initRegionNodeNumbering(IntArray &regionNodalNumbers, int &regionDofMans,
157  int offset, Domain *domain, int reg, int mode);
162  int giveTotalRBRNumberOfNodes(Domain *d);
168  void getDofManPrimaryVariable(FloatArray &answer, DofManager *dman, IntArray &dofIDMask,
169  ValueModeType mode, TimeStep *tStep, InternalStateType iType);
170 };
171 } // end namespace oofem
172 #endif // vtkexportmodule_h
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
IntArray cellVarsToExport
List of cell data to export.
Class and object Domain.
Definition: domain.h:115
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
IntArray internalVarsToExport
List of InternalStateType values, identifying the selected vars for export.
IntArray primaryVarsToExport
List of primary unknowns to export.
Abstract base class for all finite elements.
Definition: element.h:145
InternalStateValueType
Determines the type of internal variable.
Base class for dof managers.
Definition: dofmanager.h:113
Represents export output module - a base class for all output modules.
Definition: exportmodule.h:71
Class implementing an array of integers.
Definition: intarray.h:61
modeType
Determines how regions should be exported.
UnknownType
Type representing particular unknown (its physical meaning).
Definition: unknowntype.h:55
virtual const char * giveClassName() const
Returns class name of the receiver.
IntArray regionsToSkip
List of regions to skip.
NodalRecoveryModel::NodalRecoveryModelType stype
Smoother type.
#define _IFT_VTKExportModule_Name
Class representing vector of real numbers.
Definition: floatarray.h:82
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
Represents VTK (Visualization Toolkit) export module.
Class representing the general Input Record.
Definition: inputrecord.h:101
virtual const char * giveInputRecordName() const
Abstract base class representing the "problem" under consideration.
Definition: engngm.h:181
the oofem namespace is to define a context or scope in which all oofem names are defined.
The base class for all recovery models, which perform nodal averaging or projection processes for int...
NodalRecoveryModel * smoother
Smoother.
Class representing solution step.
Definition: timestep.h:80

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:32 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011