dynLattice
Loading...
Searching...
No Matches
Material.h
Go to the documentation of this file.
1
7#pragma once
8
9#include <jem/base/Array.h>
10#include <jem/base/NamedObject.h>
11#include <jem/util/Properties.h>
12#include <jive/Array.h>
13#include <jive/util/XTable.h>
14
15using jem::NamedObject;
16using jem::util::Properties;
17using jive::idx_t;
18using jive::IdxVector;
19using jive::Matrix;
20using jive::String;
21using jive::Vector;
22using jive::util::XTable;
23
38class Material : public NamedObject
39{
40public:
41 JEM_DECLARE_CLASS(Material, NamedObject);
42
44 const static char *VERBOSITY_PROP;
45
54 Material(const String &name,
55 const Properties &conf,
56 const Properties &props,
57 const Properties &globdat);
58
66 virtual void configure(const Properties &props, const Properties &globdat);
67
74 virtual void getConfig(const Properties &conf, const Properties &globdat) const;
75
87 virtual void getStress(const Vector &stress, const Vector &strain) = 0;
88
101 virtual inline void getStress(const Vector &stress, const Vector &strain, const idx_t &ielem, const idx_t &ip, const bool inelastic = true);
102
111 virtual Matrix getMaterialStiff() const = 0;
112
124 virtual inline Matrix getMaterialStiff(const idx_t &ielem, const idx_t &ip) const;
125
134 virtual Matrix getMaterialMass() const = 0;
135
145 virtual inline Matrix getMaterialMass(const idx_t &ielem, const idx_t &ip) const;
146
155 virtual Matrix getLumpedMass(const double l) const;
156
166 virtual inline Matrix getLumpedMass(const double l, const idx_t &ielem) const;
167
175 virtual void applyDeform() = 0;
176
183 virtual void rejectDeform() = 0;
184
196 virtual void getTable(const String &name, XTable &strain_table, const IdxVector &items, const Vector &weights) const = 0;
197
208 virtual double getDissipatedEnergy(const idx_t &ielem, const idx_t &ip) const = 0;
209
221 virtual double getPotentialEnergy(const idx_t &ielem, const idx_t &ip) const = 0;
222
233 virtual double getHardeningPotential(const idx_t &ielem, const idx_t &ip) const = 0;
234
241 virtual String getContext() const override;
242
243protected:
250 virtual ~Material();
251
254};
255
257void Material::getStress(const Vector &stress, const Vector &strain, const idx_t &, const idx_t &, const bool)
258{
259 getStress(stress, strain);
260}
261
263Matrix Material::getMaterialStiff(const idx_t &, const idx_t &) const
264{
265 return getMaterialStiff();
266}
267
269Matrix Material::getMaterialMass(const idx_t &, const idx_t &) const
270{
271 return getMaterialMass();
272}
273
275Matrix Material::getLumpedMass(const double l, const idx_t &) const
276{
277 return getLumpedMass(l);
278}
Abstract base class for material models.
Definition Material.h:39
virtual void configure(const Properties &props, const Properties &globdat)
Configure the material with given properties.
Definition Material.cpp:39
virtual Matrix getMaterialMass() const =0
Get the material mass matrix per unit length.
virtual double getDissipatedEnergy(const idx_t &ielem, const idx_t &ip) const =0
Get the dissipated energy at a specific integration point.
virtual Matrix getLumpedMass(const double l) const
Get the lumped mass matrix for a given element length.
Definition Material.cpp:47
virtual double getPotentialEnergy(const idx_t &ielem, const idx_t &ip) const =0
Get the potential energy at a specific integration point.
virtual ~Material()
Destroy the Material object.
Definition Material.cpp:30
virtual void getConfig(const Properties &conf, const Properties &globdat) const
Retrieve current material configuration.
Definition Material.cpp:43
virtual void rejectDeform()=0
Reject the current deformation and revert to previous state.
idx_t verbosity_
Verbosity level for material output and debugging.
Definition Material.h:253
virtual void getTable(const String &name, XTable &strain_table, const IdxVector &items, const Vector &weights) const =0
Populate strain table with material-specific data.
virtual Matrix getMaterialStiff() const =0
Get the material stiffness matrix.
virtual String getContext() const override
Get the context string for error reporting and debugging.
Definition Material.cpp:34
virtual double getHardeningPotential(const idx_t &ielem, const idx_t &ip) const =0
Get the hardening potential energy at a specific integration point.
virtual void getStress(const Vector &stress, const Vector &strain)=0
Compute stress vector from strain vector.
static const char * VERBOSITY_PROP
Property name for verbosity level control.
Definition Material.h:44
virtual void applyDeform()=0
Apply computed deformation to the material state.