OOFEM 3.0
Loading...
Searching...
No Matches
primaryfield.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 primaryfield_h
36#define primaryfield_h
37
38#include "field.h"
39#include "interface.h"
40#include "floatarray.h"
41#include "valuemodetype.h"
42#include "contextioresulttype.h"
43#include "contextmode.h"
44#include "timestep.h"
45
46#include <vector>
47
48namespace oofem {
49class PrimaryField;
50class Dof;
54
59{
60public:
61
67
82 const FloatArray &coords, IntArray &dofId, ValueModeType mode, TimeStep *tStep) = 0;
84};
85
86
105{
106protected:
110 std :: vector< FloatArray >solutionVectors;
111 std :: vector< FloatArray >prescribedVectors;
112 std :: vector< TimeStep >solStepList;
115
116public:
127 PrimaryField(EngngModel * a, int idomain, FieldType ft, int nHist);
128 virtual ~PrimaryField();
129
136 virtual void initialize(ValueModeType mode, TimeStep *tStep, FloatArray &answer, const UnknownNumberingScheme &s);
137
138 // These functions are hardcoded to assume the default numbering scheme (as is the rest of primaryfield)
139 void storeDofManager(TimeStep *tStep, DofManager &dman);
140 void storeInDofDictionaries(TimeStep *tStep);
141 void readDofManager(TimeStep *tStep, DofManager &dman);
143
148 virtual void applyDefaultInitialCondition();
158 virtual void applyBoundaryCondition(TimeStep *tStep);
165
172 virtual double giveUnknownValue(Dof *dof, ValueModeType mode, TimeStep *tStep);
173
174 int evaluateAt(FloatArray &answer, const FloatArray &coords, ValueModeType mode, TimeStep *tStep) override;
175 int evaluateAt(FloatArray &answer, DofManager *dman, ValueModeType mode, TimeStep *tStep) override;
176
187 virtual int __evaluateAt(FloatArray &answer, DofManager *dman,
188 ValueModeType mode, TimeStep *tStep, IntArray *dofId);
199 virtual int __evaluateAt(FloatArray &answer, const FloatArray &coords,
200 ValueModeType mode, TimeStep *tStep, IntArray *dofId);
205 virtual FloatArray *giveSolutionVector(TimeStep *tStep);
206
213 virtual void update(ValueModeType mode, TimeStep *tStep, const FloatArray &vectorToStore, const UnknownNumberingScheme &s);
214
219 virtual void advanceSolution(TimeStep *tStep);
220
221 void saveContext(DataStream &stream) override;
222 void restoreContext(DataStream &stream) override;
223
224 const char *giveClassName() const override { return "PrimaryField"; }
225
227protected:
228 int resolveIndx(TimeStep *tStep, int shift);
229 FloatArray *giveSolutionVector(int);
230 FloatArray *givePrescribedVector(int);
231};
232} // end namespace oofem
233#endif // primaryfield_h
virtual int EIPrimaryFieldI_evaluateFieldVectorAt(FloatArray &answer, PrimaryField &pf, const FloatArray &coords, IntArray &dofId, ValueModeType mode, TimeStep *tStep)=0
Field(FieldType b=FieldType::FT_Unknown)
Definition field.h:95
Interface()
Constructor.
Definition interface.h:86
virtual double giveUnknownValue(Dof *dof, ValueModeType mode, TimeStep *tStep)
int evaluateAt(FloatArray &answer, const FloatArray &coords, ValueModeType mode, TimeStep *tStep) override
void restoreContext(DataStream &stream) override
void readFromDofDictionaries(TimeStep *tStep)
std ::vector< FloatArray > prescribedVectors
virtual void update(ValueModeType mode, TimeStep *tStep, const FloatArray &vectorToStore, const UnknownNumberingScheme &s)
void applyInitialCondition(InitialCondition &ic)
virtual void applyDefaultInitialCondition()
EngngModel * emodel
virtual void initialize(ValueModeType mode, TimeStep *tStep, FloatArray &answer, const UnknownNumberingScheme &s)
PrimaryField(EngngModel *a, int idomain, FieldType ft, int nHist)
void storeDofManager(TimeStep *tStep, DofManager &dman)
void storeInDofDictionaries(TimeStep *tStep)
void saveContext(DataStream &stream) override
virtual void applyBoundaryCondition(TimeStep *tStep)
virtual int __evaluateAt(FloatArray &answer, DofManager *dman, ValueModeType mode, TimeStep *tStep, IntArray *dofId)
const char * giveClassName() const override
std ::vector< FloatArray > solutionVectors
std ::vector< TimeStep > solStepList
void readDofManager(TimeStep *tStep, DofManager &dman)
virtual FloatArray * giveSolutionVector(TimeStep *tStep)
virtual void advanceSolution(TimeStep *tStep)
FieldType
Physical type of field.
Definition field.h:64
#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