OOFEM 3.0
Loading...
Searching...
No Matches
mpm.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 "mpm.h"
37#include "engngm.h"
38
39namespace oofem {
40
41void
43{
44 // read interpolation type
45 std::string name;
46 IR_GIVE_FIELD(ir, name, "interpolation");
47 // get corresponding interpolation from catalogue
48 this->interpolation = interpolationCatalogue.getInterpolationByName(name);
49
50 // read variable type
51 ir.giveField(this->type,"type");
52 // read quantity
53 ir.giveField(this->q,"quantity");
54 // read variable size
55 IR_GIVE_FIELD(ir, this->size, "size");
56 // read dofs
57 IR_GIVE_FIELD(ir, this->dofIDs, "dofs");
58}
59
60void
62{
63 // read field and test field ids (names)
64 std::string name;
65 IR_GIVE_FIELD(ir, name, "variable");
66 this->field = problem->giveVariableByName(name);
67 IR_GIVE_FIELD(ir, name, "testvariable");
68 this->testField = problem->giveVariableByName(name);
69 IR_GIVE_FIELD(ir, this->mode, "mmode");
70}
71
72
73
74} // end namespace oofem
75
virtual void giveField(int &answer, InputFieldType id)=0
Reads the integer field value.
MaterialMode mode
Definition mpm.h:138
virtual void initializeFrom(InputRecord &ir, EngngModel *problem)
Definition mpm.C:61
const Variable * field
Definition mpm.h:136
const Variable * testField
Definition mpm.h:137
const FEInterpolation * interpolation
Definition mpm.h:94
IntArray dofIDs
Definition mpm.h:99
VariableType type
Definition mpm.h:96
VariableQuantity q
Definition mpm.h:97
void initializeFrom(InputRecord &ir)
Definition mpm.C:42
#define IR_GIVE_FIELD(__ir, __value, __id)
Definition inputrecord.h:67
InterpolationCatalogueType interpolationCatalogue

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