OOFEM 3.0
Loading...
Searching...
No Matches
vtkbaseexportmodule.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 - 2025 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 vtkbaseexportmodule_h
36#define vtkbaseexportmodule_h
37
38#include "exportmodule.h"
39#include "exportregion.h"
40#include "intarray.h"
42#include "internalstatetype.h"
43#include "unknowntype.h"
44#include "integrationrule.h"
45#include "element.h"
46#include "nodalrecoverymodel.h"
47#include <iostream>
48#include <fstream>
49#include <iomanip>
50
51#ifdef _WIN32
52 #define NULL_DEVICE "NUL:"
53#else
54 #define NULL_DEVICE "/dev/null"
55#endif
56
57
58#include <string>
59#include <list>
60
61using namespace std;
62namespace oofem {
63
64class VTKBaseExportModule;
65
66
71{
72protected:
75
76public:
80 virtual ~VTKBaseExportModule();
81
82 void initialize() override;
83 void terminate() override;
84 const char *giveClassName() const override { return "VTKBaseExportModule"; }
89 static void computeIPAverage(FloatArray &answer, IntegrationRule *iRule, Element *elem, InternalStateType isType, TimeStep *tStep);
94 int giveCellType(Element *element);
95 int giveCellType(int num) ;
96
97protected:
98
99 virtual void setupVTKPiece(ExportRegion &vtkPiece, TimeStep *tStep, Set& region);
100
104 virtual void exportPrimaryVars(ExportRegion &piece, Set& region, IntArray& primaryVarsToExport, NodalRecoveryModel& smoother, TimeStep *tStep);
108 virtual void exportIntVars(ExportRegion &piece, Set& region, IntArray& internalVarsToExport, NodalRecoveryModel& smoother, TimeStep *tStep);
112 void exportExternalForces(ExportRegion &piece, int region, TimeStep *tStep);
113
114 //void exportXFEMVarAs(XFEMStateType xfemstype, int regionDofMans, int ireg, TimeStep *tStep, EnrichmentItem *ei);
116 void exportCellVars(ExportRegion &piece, Set& region, IntArray &cellVarsToExport, TimeStep *tStep);
120 void exportExternalForces(ExportRegion &piece, Set& region, IntArray& externalForcesToExport, TimeStep *tStep);
121 /*
122 * Export set membership
123 */
124 void exportSetMembership(ExportRegion &piece, Set& region, TimeStep *tStep);
125
126 // Tries to find the value of a primary field on the given DofManager.
127 // Some elements have different interpolation of some fields, and requires some additional code to compute node values (if available).
128 void getNodalVariableFromPrimaryField(FloatArray &answer, DofManager *dman, TimeStep *tStep, UnknownType type, Set& region, NodalRecoveryModel& smoother);
129 //
130 // Exports single internal variable by smoothing.
131 //
132 void getNodalVariableFromIS(FloatArray &answer, Node *node, TimeStep *tStep, InternalStateType type, Set& region, NodalRecoveryModel& smoother);
133 // void getNodalVariableFromXFEMST(FloatArray &answer, Node *node, TimeStep *tStep, XFEMStateType xfemstype,Set& region, EnrichmentItem *ei);
134 //
135 // Exports a single cell variable (typically an internal variable).
136 //
137 void getCellVariableFromIS(FloatArray &answer, Element *el, InternalStateType type, TimeStep *tStep);
138
139
141 static void makeFullTensorForm(FloatArray &answer, const FloatArray &reducedForm, InternalStateValueType vtype);
145 int giveNumberOfNodesPerCell(int cellType);
149 void giveElementCell(IntArray &answer, Element *elem);
158 virtual int initRegionNodeNumbering(ExportRegion& vtkPiece,
159 Domain *domain, TimeStep *tStep, Set& region);
160
161 // Export of composite elements (built up from several subcells)
162 bool isElementComposite(Element *elem);
164 void exportCompositeElement(std::vector< ExportRegion > &vtkPieces, Element *el, TimeStep *tStep);
165};
166
167} // end namespace oofem
168#endif // vtkbaseexportmodule_h
ExportModule(int n, EngngModel *e)
Constructor. Creates empty Output Manager with number n.
Stores all neccessary data (of a region) in a VTKPiece so it can be exported later.
void exportSetMembership(ExportRegion &piece, Set &region, TimeStep *tStep)
static IntArray redToFull
Map from Voigt to full tensor.
int giveNumberOfNodesPerCell(int cellType)
void exportCompositeElement(ExportRegion &vtkPiece, Element *el, TimeStep *tStep)
Returns true if element geometry type is composite (not a single cell).
bool isElementComposite(Element *elem)
void exportCellVars(ExportRegion &piece, Set &region, IntArray &cellVarsToExport, TimeStep *tStep)
Exports cell variables (typically internal variables).
void giveElementCell(IntArray &answer, Element *elem)
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.
void getNodalVariableFromIS(FloatArray &answer, Node *node, TimeStep *tStep, InternalStateType type, Set &region, NodalRecoveryModel &smoother)
virtual int initRegionNodeNumbering(ExportRegion &vtkPiece, Domain *domain, TimeStep *tStep, Set &region)
VTKBaseExportModule(int n, EngngModel *e)
Constructor. Creates empty Output Manager. By default all components are selected.
void exportExternalForces(ExportRegion &piece, int region, TimeStep *tStep)
void getCellVariableFromIS(FloatArray &answer, Element *el, InternalStateType type, TimeStep *tStep)
void exportCompositeElement(std::vector< ExportRegion > &vtkPieces, Element *el, TimeStep *tStep)
void getNodalVariableFromPrimaryField(FloatArray &answer, DofManager *dman, TimeStep *tStep, UnknownType type, Set &region, NodalRecoveryModel &smoother)
const char * giveClassName() const override
Returns class name of the receiver.
InternalStateValueType
Determines the type of internal variable.
#define OOFEM_EXPORT
Definition oofemcfg.h:7

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