OOFEM 3.0
Loading...
Searching...
No Matches
material.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 material_h
36#define material_h
37
38#include "femcmpnn.h"
39
40#include "matconst.h"
41#include "matstatus.h"
42#include "materialmode.h"
43#include "timestep.h"
44#include "internalstatetype.h"
46#include "matresponsemode.h"
47#include "dictionary.h"
48#include "chartype.h"
49
51
52#define _IFT_Material_density "d"
53#define _IFT_Material_castingtime "castingtime"
54#define _IFT_Material_preCastingTimeMat "precastingtimemat"
56
57namespace oofem {
58#define STRAIN_STEPS 10.0
59
60class GaussPoint;
61class Dictionary;
62class FloatArray;
63class FloatMatrix;
64class Element;
65class ProcessCommunicator;
66
98{
99protected:
108
116
119
120
121public:
127 Material(int n, Domain *d);
129 virtual ~Material() = default;
130
135 virtual bool isCharacteristicMtrxSymmetric(MatResponseMode rMode) const { return true; }
140 virtual void giveCharacteristicMatrix(FloatMatrix &answer, MatResponseMode type, GaussPoint* gp, TimeStep *tStep) const {}
145 virtual void giveCharacteristicVector(FloatArray &answer, FloatArray& flux, MatResponseMode type, GaussPoint* gp, TimeStep *tStep) const {}
150 virtual double giveCharacteristicValue(MatResponseMode type, GaussPoint* gp, TimeStep *tStep) const ;
159 virtual double give(int aProperty, GaussPoint *gp) const;
166 virtual bool hasProperty(int aProperty, GaussPoint *gp) const;
173 virtual void modifyProperty(int aProperty, double value, GaussPoint *gp);
177 double giveCastingTime() const { return this->castingTime; }
182 virtual bool isActivated(TimeStep *tStep) const {
183 if ( tStep ) {
184 return ( tStep->giveTargetTime() >= this->castingTime );
185 } else {
186 return true;
187 }
188 }
189
190 // identification and auxiliary functions
196 virtual bool hasMaterialModeCapability(MaterialMode mode) const;
197
202 virtual bool hasCastingTimeSupport() const;
203
205
206
214 virtual int setIPValue(const FloatArray &value, GaussPoint *gp, InternalStateType type)
215 { return 0; }
216
224 virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep);
226
227 void initializeFrom(InputRecord &ir) override;
228 void giveInputRecord(DynamicInputRecord &input) override;
229 void printYourself() override;
230
238 virtual void saveIPContext(DataStream &stream, ContextMode mode, GaussPoint *gp);
246 virtual void restoreIPContext(DataStream &stream, ContextMode mode, GaussPoint *gp);
247
255 int checkConsistency() override;
262 virtual void restoreConsistency(GaussPoint *gp) { }
269 virtual int initMaterial(Element *element);
277 virtual MaterialStatus *giveStatus(GaussPoint *gp) const;
278 /*
279 * In the case of nonlocal constitutive models,
280 * the use of multiple inheritance is assumed. Typically, the class representing nonlocal
281 * constitutive model is derived both from class representing local model and from class
282 * NonlocalMaterialExtension or from one of its derived classes
283 * (which declare services and variables corresponding to specific analysis type).
284 * Or alternatively, material model can introduce stronger form of this relation,
285 * it can possess object of NonlocalMaterialExtension.
286 * @return In both cases, this function returns pointer to this object, obtained by
287 * returning address of component or using pointer conversion from receiver to base class
288 * NonlocalMaterialExtension. If no nonlocal extension exists, NULL pointer is returned.
289 */
290 //virtual NonlocalMaterialExtension* giveNonlocalMaterialExtensionPtr () {return NULL;}
291
302 virtual int packUnknowns(DataStream &buff, TimeStep *tStep, GaussPoint *ip) { return 1; }
311 virtual int unpackAndUpdateUnknowns(DataStream &buff, TimeStep *tStep, GaussPoint *ip) { return 1; }
315 virtual int estimatePackSize(DataStream &buff, GaussPoint *ip) { return 0; }
321 virtual double predictRelativeComputationalCost(GaussPoint *gp) { return 1.0; }
325 virtual double predictRelativeRedistributionCost(GaussPoint *gp) { return 1.0; }
326
332 virtual std::unique_ptr<MaterialStatus> CreateStatus(GaussPoint *gp) const
333 { return std::unique_ptr<MaterialStatus>() ; }
334
344 virtual void initTempStatus(GaussPoint *gp) const;
345
352 void saveContext(DataStream &stream, ContextMode mode) override;
360 void restoreContext(DataStream &stream, ContextMode mode) override;
361};
362} // end namespace oofem
363#endif // material_h
FEMComponent(int n, Domain *d)
Definition femcmpnn.h:88
virtual std::unique_ptr< MaterialStatus > CreateStatus(GaussPoint *gp) const
Definition material.h:332
virtual ~Material()=default
Destructor.
double giveCastingTime() const
Definition material.h:177
Material(int n, Domain *d)
Definition material.C:46
virtual int setIPValue(const FloatArray &value, GaussPoint *gp, InternalStateType type)
Definition material.h:214
virtual void giveCharacteristicVector(FloatArray &answer, FloatArray &flux, MatResponseMode type, GaussPoint *gp, TimeStep *tStep) const
Returns characteristic vector of the receiver.
Definition material.h:145
virtual void giveCharacteristicMatrix(FloatMatrix &answer, MatResponseMode type, GaussPoint *gp, TimeStep *tStep) const
Returns characteristic matrix of the receiver.
Definition material.h:140
virtual int estimatePackSize(DataStream &buff, GaussPoint *ip)
Definition material.h:315
double castingTime
Definition material.h:115
virtual int unpackAndUpdateUnknowns(DataStream &buff, TimeStep *tStep, GaussPoint *ip)
Definition material.h:311
virtual void restoreConsistency(GaussPoint *gp)
Definition material.h:262
int preCastingTimeMat
Material existing before casting time - optional parameter, zero by default.
Definition material.h:118
virtual double predictRelativeComputationalCost(GaussPoint *gp)
Definition material.h:321
virtual bool isCharacteristicMtrxSymmetric(MatResponseMode rMode) const
Definition material.h:135
Dictionary propertyDictionary
Definition material.h:107
virtual bool isActivated(TimeStep *tStep) const
Definition material.h:182
virtual double predictRelativeRedistributionCost(GaussPoint *gp)
Definition material.h:325
virtual int packUnknowns(DataStream &buff, TimeStep *tStep, GaussPoint *ip)
Definition material.h:302
double giveTargetTime()
Returns target time.
Definition timestep.h:164
long ContextMode
Definition contextmode.h:43
#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