OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
gnuplotexportmodule.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 GNUPLOTEXPORTMODULE_H_
36 #define GNUPLOTEXPORTMODULE_H_
37 
38 #include "exportmodule.h"
39 #include "floatarray.h"
40 
41 #include <unordered_map>
42 #include <memory>
43 
45 
46 #define _IFT_GnuplotExportModule_Name "gnuplot"
47 // Sum of reaction forces for each Dirichlet BC
48 #define _IFT_GnuplotExportModule_ReactionForces "reactionforces"
49 // Special output from boundary conditions
50 #define _IFT_GnuplotExportModule_BoundaryConditions "boundaryconditions"
51 #define _IFT_GnuplotExportModule_BoundaryConditionsExtra "boundaryconditionsextra"
52 // Mesh
53 #define _IFT_GnuplotExportModule_mesh "mesh"
54 // XFEM stuff
55 #define _IFT_GnuplotExportModule_xfem "xfem"
56 // Node for monitoring displacement
57 #define _IFT_GnuplotExportModule_monitornode "monitornode"
58 // Radii for material force evaluation
59 #define _IFT_GnuplotExportModule_materialforceradii "matforceradii"
60 // Export length of cracks
61 #define _IFT_GnuplotExportModule_cracklength "cracklength"
62 // Special output for interface elements
63 #define _IFT_GnuplotExportModule_interface_el "interfaceel"
64 
65 
66 namespace oofem {
67 class EnrichmentItem;
68 class Crack;
69 class PrescribedGradient;
70 class PrescribedGradientBCNeumann;
71 class PrescribedGradientBCWeak;
72 class PrescribedGradientBC;
73 class Domain;
74 class DofManager;
75 class MaterialForceEvaluator;
76 
77 
86 class OOFEM_EXPORT GnuplotExportModule : public ExportModule
87 {
88 public:
90  virtual ~GnuplotExportModule();
91 
92  virtual IRResultType initializeFrom(InputRecord *ir);
93  virtual void doOutput(TimeStep *tStep, bool forcedOutput = false);
94  virtual void initialize();
95  virtual void terminate();
96 
97  virtual const char *giveClassName() const { return "GnuplotExportModule"; }
98  virtual const char *giveInputRecordName() const { return _IFT_GnuplotExportModule_Name; }
99 
103  void outputXFEM(EnrichmentItem &iEI, TimeStep *tStep);
104  void outputXFEM(Crack &iCrack, TimeStep *tStep);
105 
106  void outputXFEMGeometry(const std::vector< std::vector<FloatArray> > &iEnrItemPoints);
107 
111  void outputBoundaryCondition(PrescribedGradient &iBC, TimeStep *tStep);
112  void outputBoundaryCondition(PrescribedGradientBCNeumann &iBC, TimeStep *tStep);
113  void outputBoundaryCondition(PrescribedGradientBCWeak &iBC, TimeStep *tStep);
114 
115 
119  void outputGradient(int bc, Domain &d, FloatArray &grad, TimeStep *tStep);
120 
124  void outputMesh(Domain &iDomain);
125 
129  void outputNodeDisp(DofManager &iDMan, TimeStep *tStep);
130 
134  void outputInterfaceEl(Domain &d, TimeStep *tStep);
135 
136  static void WritePointsToGnuplot(const std :: string &iName, const std :: vector< std::vector<FloatArray> > &iPoints);
137 
138 protected:
146 
148  std::vector<FloatArray> mMonitorNodeDispHist;
149 
153  std::vector< std::vector<FloatArray> > mReactionForceHistory;
154  std::vector< std::vector<double> > mDispHist;
155 
156  void outputReactionForces(TimeStep *tStep);
157 
161  std :: unique_ptr< MaterialForceEvaluator > mpMatForceEvaluator;
163 
167  std::unordered_map< int, std::vector<double> > mCrackLengthHist;
168  std::vector<double> mTimeHist;
169 };
170 } // end namespace oofem
171 #endif /* GNUPLOTEXPORTMODULE_H_ */
Prescribes or where are primary unknowns for the subscale.
std::vector< double > mTimeHist
Abstract class representing entity, which is included in the FE model using one (or more) global func...
virtual const char * giveInputRecordName() const
Class and object Domain.
Definition: domain.h:115
Imposes a prescribed gradient weakly on the boundary with a Neumann boundary condition.
Base class for dof managers.
Definition: dofmanager.h:113
Represents export output module - a base class for all output modules.
Definition: exportmodule.h:71
Crack.
Definition: crack.h:54
virtual const char * giveClassName() const
Returns class name of the receiver.
Imposes a prescribed gradient weakly on the boundary with an independent traction discretization...
Class representing vector of real numbers.
Definition: floatarray.h:82
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
std::unique_ptr< MaterialForceEvaluator > mpMatForceEvaluator
Evaluator for material forces.
std::vector< FloatArray > mMonitorNodeDispHist
Class representing the general Input Record.
Definition: inputrecord.h:101
std::vector< std::vector< FloatArray > > mReactionForceHistory
Stores the sum of reaction forces for each BC.
Abstract base class representing the "problem" under consideration.
Definition: engngm.h:181
#define _IFT_GnuplotExportModule_Name
std::vector< std::vector< double > > mDispHist
the oofem namespace is to define a context or scope in which all oofem names are defined.
(Under development) The Gnuplot export module enables OOFEM to export some data in a format that can ...
std::unordered_map< int, std::vector< double > > mCrackLengthHist
Store time history of crack lengths.
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:29 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011