OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
exportmodule.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 exportmodule_h
36 #define exportmodule_h
37 
38 #include "oofemcfg.h"
39 #include "intarray.h"
40 #include "inputrecord.h"
41 #include "range.h"
42 #include "set.h"
43 
44 #include <list>
45 
47 
48 #define _IFT_ExportModule_tstepall "tstep_all"
49 #define _IFT_ExportModule_tstepstep "tstep_step"
50 #define _IFT_ExportModule_tstepsout "tsteps_out"
51 #define _IFT_ExportModule_subtstepsout "subtsteps_out"
52 #define _IFT_ExportModule_domainall "domain_all"
53 #define _IFT_ExportModule_domainmask "domain_mask"
54 #define _IFT_ExportModule_regionsets "regionsets"
55 #define _IFT_ExportModule_timescale "timescale"
56 
57 
58 namespace oofem {
59 class EngngModel;
60 class TimeStep;
61 
71 class OOFEM_EXPORT ExportModule
72 {
73 protected:
75  int number;
83  std :: list< Range >tsteps_out;
91 
96 
99 
101  double timeScale;
102 
104  int giveNumberOfRegions();
105 
108 
110  Set *giveRegionSet(int i);
111 
112 public:
113 
115  ExportModule(int n, EngngModel * e);
117  virtual ~ExportModule();
119  virtual IRResultType initializeFrom(InputRecord *ir);
125  virtual void doOutput(TimeStep *tStep, bool forcedOutput = false) = 0;
130  void doForcedOutput(TimeStep *tStep) { doOutput(tStep, true); }
138  bool testSubStepOutput() { return this->tstep_substeps_out_flag; }
139 
140  virtual void initialize();
141 
146  virtual void initializeElementSet();
147 
153  virtual void terminate() { }
155  virtual const char *giveClassName() const = 0;
156 
157 protected:
162  std :: string giveOutputBaseFileName(TimeStep *tStep);
168  bool testTimeStepOutput(TimeStep *tStep);
173  bool testDomainOutput(int n);
174 
176  std :: string errorInfo(const char *func) const;
177 };
178 } // end namespace oofem
179 #endif // exportmodule_h
IntArray regionSets
regions represented by sets
Definition: exportmodule.h:98
IntArray domainMask
Domain selection mask.
Definition: exportmodule.h:95
void doForcedOutput(TimeStep *tStep)
Writes the output.
Definition: exportmodule.h:130
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
bool domain_all_flag
Indicates all domains.
Definition: exportmodule.h:93
bool testSubStepOutput()
Initializes receiver.
Definition: exportmodule.h:138
bool tstep_substeps_out_flag
Flag turning output in solution step substeps/itarations.
Definition: exportmodule.h:90
EngngModel * emodel
Problem pointer.
Definition: exportmodule.h:77
Set defaultElementSet
Default region set.
Definition: exportmodule.h:107
Set of elements, boundaries, edges and/or nodes.
Definition: set.h:66
int tstep_step_out
User timeStep Output step. Indicates every tstep_step_out-th step selected.
Definition: exportmodule.h:81
bool tstep_all_out_flag
Indicates all steps selection.
Definition: exportmodule.h:79
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
Class representing the general Input Record.
Definition: inputrecord.h:101
int number
Component number.
Definition: exportmodule.h:75
std::string errorInfo(const char *func)
Definition: error.C:41
double timeScale
Scaling time in output, e.g. conversion from seconds to hours.
Definition: exportmodule.h:101
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.
std::list< Range > tsteps_out
List of user selected step numbers.
Definition: exportmodule.h:83
virtual void terminate()
Terminates the receiver.
Definition: exportmodule.h:153
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:28 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011