OOFEM 3.0
Loading...
Searching...
No Matches
intvarfield.C
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#include "intvarfield.h"
36#include "classfactory.h"
37#include "dofmanager.h"
39
40namespace oofem {
41InternalVariableField :: InternalVariableField(InternalStateType ist, FieldType ft, MaterialMappingAlgorithmType mma_type, Domain *d) :
42 Field(ft),
43 mma(classFactory.createMaterialMappingAlgorithm(mma_type)),
44 type(ist),
45 domain(d)
46{}
47
48int
49InternalVariableField :: evaluateAt(FloatArray &answer, const FloatArray &coords, ValueModeType mode, TimeStep *tStep)
50{
51 IntArray types(1);
52 types.at(1) = this->type;
54 Set eset(0, domain);
55 eset.addAllElements();
56 this->mma->__init(domain, types, coords, eset, tStep);
57 this->mma->__mapVariable(answer, coords, this->type, tStep);
58
59 return 0; // ok
60}
61
62int
63InternalVariableField :: evaluateAt(FloatArray &answer, DofManager *dman, ValueModeType mode, TimeStep *tStep)
64{
65 return this->evaluateAt(answer, dman->giveCoordinates(), mode, tStep);
66}
67
68void
69InternalVariableField :: saveContext(DataStream &stream)
70{}
71
72void
73InternalVariableField :: restoreContext(DataStream &stream)
74{}
75} // end namespace oofem
const FloatArray & giveCoordinates() const
Definition dofmanager.h:390
Field(FieldType b=FieldType::FT_Unknown)
Definition field.h:95
int & at(std::size_t i)
Definition intarray.h:104
Domain * domain
Source domain.
Definition intvarfield.h:65
int evaluateAt(FloatArray &answer, const FloatArray &coords, ValueModeType mode, TimeStep *tStep) override
Definition intvarfield.C:49
InternalStateType type
InternalStateType.
Definition intvarfield.h:63
std::unique_ptr< MaterialMappingAlgorithm > mma
Material mapping algorithm used.
Definition intvarfield.h:61
void addAllElements()
Definition set.C:239
FieldType
Physical type of field.
Definition field.h:64
ClassFactory & classFactory

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