OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
femcmpnn.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 /*
36  * The original idea for this class comes from
37  * Dubois-Pelerin, Y.: "Object-Oriented Finite Elements: Programming concepts and Implementation",
38  * PhD Thesis, EPFL, Lausanne, 1992.
39  */
40 
41 #ifndef femcmpnn_h
42 #define femcmpnn_h
43 
44 #include <string>
45 
46 #include "oofemcfg.h"
47 #include "interfacetype.h"
48 #include "irresulttype.h"
49 #include "contextioresulttype.h"
50 #include "contextmode.h"
51 
52 namespace oofem {
53 class DataStream;
54 class Domain;
55 class Interface;
56 class TimeStep;
57 class InputRecord;
58 class DynamicInputRecord;
59 class oofegGraphicContext;
60 class EntityRenumberingFunctor;
61 class FloatArray;
62 class IntArray;
63 class FloatMatrix;
64 
76 class OOFEM_EXPORT FEMComponent
77 {
78 protected:
80  int number;
83 
84 public:
91  FEMComponent(int n, Domain * d) : number(n), domain(d) { }
93  virtual ~FEMComponent() { }
94 
96  virtual const char *giveClassName() const = 0;
98  virtual const char *giveInputRecordName() const = 0;
100  Domain *giveDomain() const { return domain; }
105  virtual void setDomain(Domain *d) { this->domain = d; }
107  int giveNumber() const { return number; }
112  void setNumber(int num) { this->number = num; }
132  virtual IRResultType initializeFrom(InputRecord *ir);
137  virtual void giveInputRecord(DynamicInputRecord &input);
146  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj = NULL);
156  virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj = NULL);
164  virtual int checkConsistency();
171  virtual void printOutputAt(FILE *file, TimeStep *tStep) { }
173  virtual void printYourself() { }
179  virtual Interface *giveInterface(InterfaceType t) { return NULL; }
180 
182  std :: string errorInfo(const char *func) const;
183 };
184 } // end namespace oofem
185 #endif // femcmpnn_h
int number
Component number.
Definition: femcmpnn.h:80
Class and object Domain.
Definition: domain.h:115
Domain * domain
Link to domain object, useful for communicating with other FEM components.
Definition: femcmpnn.h:82
virtual void updateLocalNumbering(EntityRenumberingFunctor &f)
Local renumbering support.
Definition: femcmpnn.h:120
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
virtual void printYourself()
Prints receiver state on stdout. Useful for debugging.
Definition: femcmpnn.h:173
FEMComponent(int n, Domain *d)
Regular constructor, creates component with given number and belonging to given domain.
Definition: femcmpnn.h:91
void setNumber(int num)
Sets number of receiver.
Definition: femcmpnn.h:112
virtual ~FEMComponent()
Virtual destructor.
Definition: femcmpnn.h:93
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
Class representing the general Input Record.
Definition: inputrecord.h:101
Class Interface.
Definition: interface.h:82
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Prints output of receiver to stream, for given time step.
Definition: femcmpnn.h:171
virtual Interface * giveInterface(InterfaceType t)
Interface requesting service.
Definition: femcmpnn.h:179
Class representing the a dynamic Input Record.
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
std::string errorInfo(const char *func)
Definition: error.C:41
Domain * giveDomain() const
Definition: femcmpnn.h:100
InterfaceType
Enumerative type, used to identify interface type.
Definition: interfacetype.h:43
the oofem namespace is to define a context or scope in which all oofem names are defined.
int giveNumber() const
Definition: femcmpnn.h:107
virtual void setDomain(Domain *d)
Sets associated Domain.
Definition: femcmpnn.h:105
Class representing solution step.
Definition: timestep.h:80
The top abstract class of all classes constituting the finite element mesh.
Definition: femcmpnn.h:76

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