OOFEM 3.0
Loading...
Searching...
No Matches
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 - 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/*
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 "oofemenv.h"
47#include "interfacetype.h"
48#include "contextioresulttype.h"
49#include "contextmode.h"
50#include "floatarray.h"
51
52namespace oofem {
53class DataStream;
54class Domain;
55class Interface;
56class TimeStep;
57class InputRecord;
61
74{
75protected:
77 int number;
80
81public:
88 FEMComponent(int n, Domain * d) : number(n), domain(d) { }
90 virtual ~FEMComponent() = default;
91
93 virtual const char *giveClassName() const = 0;
95 virtual const char *giveInputRecordName() const = 0;
97 Domain *giveDomain() const { return domain; }
102 virtual void setDomain(Domain *d) { this->domain = d; }
104 int giveNumber() const { return number; }
109 void setNumber(int num) { this->number = num; }
130 virtual void initializeFrom(InputRecord &ir);
131 virtual void initializeFrom(InputRecord &ir, int priority) { initializeFrom(ir); }
136 virtual void initializeFinish() {}
138 virtual void postInitialize() {}
143 virtual void giveInputRecord(DynamicInputRecord &input);
150 virtual void saveContext(DataStream &stream, ContextMode mode);
158 virtual void restoreContext(DataStream &stream, ContextMode mode);
166 virtual int checkConsistency();
173 virtual void printOutputAt(FILE *file, TimeStep *tStep) { }
175 virtual void printYourself() { }
181 virtual Interface *giveInterface(InterfaceType t) { return nullptr; }
182
184 std :: string errorInfo(const char *func) const;
185};
186} // end namespace oofem
187#endif // femcmpnn_h
Domain * giveDomain() const
Definition femcmpnn.h:97
virtual void initializeFrom(InputRecord &ir, int priority)
Definition femcmpnn.h:131
virtual void setDomain(Domain *d)
Definition femcmpnn.h:102
virtual Interface * giveInterface(InterfaceType t)
Definition femcmpnn.h:181
virtual void postInitialize()
Performs post initialization steps. Called after all components are created and initialized.
Definition femcmpnn.h:138
virtual void updateLocalNumbering(EntityRenumberingFunctor &f)
Definition femcmpnn.h:117
virtual void printYourself()
Prints receiver state on stdout. Useful for debugging.
Definition femcmpnn.h:175
Domain * domain
Link to domain object, useful for communicating with other FEM components.
Definition femcmpnn.h:79
void setNumber(int num)
Definition femcmpnn.h:109
virtual const char * giveInputRecordName() const =0
int number
Component number.
Definition femcmpnn.h:77
virtual const char * giveClassName() const =0
int giveNumber() const
Definition femcmpnn.h:104
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Definition femcmpnn.h:173
virtual ~FEMComponent()=default
Virtual destructor.
FEMComponent(int n, Domain *d)
Definition femcmpnn.h:88
virtual void initializeFinish()
Definition femcmpnn.h:136
long ContextMode
Definition contextmode.h:43
std::string errorInfo(const char *func)
Definition error.C:47
#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