OOFEM 3.0
Loading...
Searching...
No Matches
structuralpythonmaterial.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 structuralpythonmaterial_h
36#define structuralpythonmaterial_h
37
38#include<boost/python.hpp>
39namespace bp=boost::python;
40
43
44
46
47#define _IFT_StructuralPythonMaterial_Name "structuralpythonmaterial"
48#define _IFT_StructuralPythonMaterial_moduleName "module"
50
51namespace oofem {
70{
71private:
73 std :: string moduleName;
75 bp::object module;
78 // callables for large deformations
80
82 double pert = 1e-12;
83public:
86
87 void initializeFrom(InputRecord &ir) override;
88 void giveInputRecord(DynamicInputRecord &input) override;
89
90 MaterialStatus *CreateStatus(GaussPoint *gp) const override;
91
92 FloatArray callStressFunction(bp::object func, const FloatArray &oldStrain, const FloatArray &oldStress, const FloatArray &strain, bp::object stateDict, bp::object tempStateDict, TimeStep *tStep) const;
93
94 FloatMatrix callTangentFunction(bp::object func, const FloatArray &oldStrain, const FloatArray &oldStress, bp::object stateDict, bp::object tempStateDict, TimeStep *tStep) const;
95
96
97
99 MatResponseMode mode, GaussPoint *gp, TimeStep *tStep); //TODO check override
100
102 TimeStep *tStep) const override;
103
105 const FloatArray &reducedStrain, TimeStep *tStep); //TODO check override
106
108 TimeStep *tStep) const override;
109
110 int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override;
111
112 const char *giveClassName() const override { return "StructuralPythonMaterial"; }
113 const char *giveInputRecordName() const override { return _IFT_StructuralPythonMaterial_Name; }
114};
115
117{
118protected:
121
122public:
125
126 void initTempStatus() override;
127 void updateYourself(TimeStep *tStep) override;
129
130 bp::object giveStateDictionary() { return stateDict; }
131 bp::object giveTempStateDictionary() { return tempStateDict; }
132
133 const char *giveClassName() const override { return "StructuralPythonMaterialStatus"; }
134};
135} // end namespace oofem
136#endif // structuralpythonmaterial_h
GaussPoint * gp
Associated integration point.
StructuralMaterialStatus(GaussPoint *g)
Constructor. Creates new StructuralMaterialStatus with IntegrationPoint g.
StructuralMaterial(int n, Domain *d)
bp::dict stateDict
Internal state variables.
StructuralPythonMaterialStatus(GaussPoint *gp)
Constructor.
void updateYourself(TimeStep *tStep) override
MaterialStatus * CreateStatus(GaussPoint *gp) const override
bp::object module
module containing functions (created from moduleName)
FloatMatrixF< 9, 9 > give3dMaterialStiffnessMatrix_dPdF(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override
void initializeFrom(InputRecord &ir) override
FloatArrayF< 9 > giveFirstPKStressVector_3d(const FloatArrayF< 9 > &vF, GaussPoint *gp, TimeStep *tStep) const override
Default implementation relies on giveRealStressVector for second Piola-Kirchoff stress.
void give3dMaterialStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
const char * giveInputRecordName() const override
const char * giveClassName() const override
std::string moduleName
Name of the file that contains the python function.
FloatMatrix callTangentFunction(bp::object func, const FloatArray &oldStrain, const FloatArray &oldStress, bp::object stateDict, bp::object tempStateDict, TimeStep *tStep) const
double pert
Numerical pertubation for numerical tangents.
StructuralPythonMaterial(int n, Domain *d)
Constructor.
void giveRealStressVector_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedStrain, TimeStep *tStep)
bp::object smallDef
callable for small deformations
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
FloatArray callStressFunction(bp::object func, const FloatArray &oldStrain, const FloatArray &oldStress, const FloatArray &strain, bp::object stateDict, bp::object tempStateDict, TimeStep *tStep) const
void giveInputRecord(DynamicInputRecord &input) override
#define _IFT_StructuralPythonMaterial_Name

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