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
36class Material : public NamedObject
37{
38 public:
39 JEM_DECLARE_CLASS(Material, NamedObject);
40
42 const static char *VERBOSITY_PROP;
43
50 Material(const String &name,
51 const Properties &conf,
52 const Properties &props,
53 const Properties &globdat);
54
60 virtual void configure(const Properties &props, const Properties &globdat);
61
66 virtual void getConfig(const Properties &conf, const Properties &globdat) const;
67
77 virtual void getStress(const Vector &stress, const Vector &strain) = 0;
78
89 virtual inline void getStress(const Vector &stress, const Vector &strain, const idx_t &ielem, const idx_t &ip, const bool inelastic = true);
90
97 virtual Matrix getMaterialStiff() const = 0;
98
108 virtual inline Matrix getMaterialStiff(const idx_t &ielem, const idx_t &ip) const;
109
113 virtual inline void getMaterialStiff(const Matrix &stiff) const;
114
120 virtual inline void getMaterialStiff(const Matrix &stiff, const idx_t &ielem, const idx_t &ip) const;
121
128 virtual Matrix getMaterialMass() const = 0;
129
137 virtual inline Matrix getMaterialMass(const idx_t &ielem, const idx_t &ip) const;
138
142 virtual inline void getMaterialMass(const Matrix &mass) const;
143
149 virtual inline void getMaterialMass(const Matrix &mass, const idx_t &ielem, const idx_t &ip) const;
150
157 virtual Matrix getLumpedMass(const double l) const;
158
166 virtual inline Matrix getLumpedMass(const double l, const idx_t &ielem) const;
167
173 virtual void applyDeform() = 0;
174
179 virtual void rejectDeform() = 0;
180
190 virtual void getTable(XTable &strain_table, const Vector &weights, const String &name, const IdxVector &items) const = 0;
191
203 virtual double getDissipatedEnergy(const idx_t &ielem, const idx_t &ip) const = 0;
204
217 virtual double getPotentialEnergy(const idx_t &ielem, const idx_t &ip) const = 0;
218
227 virtual double getHardeningPotential(const idx_t &ielem, const idx_t &ip) const = 0;
228
233 virtual String getContext() const override;
234
235 protected:
240 virtual ~Material();
241
244};
245
247void Material::getStress(const Vector &stress, const Vector &strain, const idx_t &, const idx_t &, const bool)
248{
249 getStress(stress, strain);
250}
251
253Matrix Material::getMaterialStiff(const idx_t &, const idx_t &) const
254{
255 return getMaterialStiff();
256}
257
259void Material::getMaterialStiff(const Matrix &stiff) const
260{
261 stiff = getMaterialStiff();
262}
263
265void Material::getMaterialStiff(const Matrix &stiff, const idx_t &ielem, const idx_t &ip) const
266{
267 stiff = getMaterialStiff(ielem, ip);
268}
269
271Matrix Material::getMaterialMass(const idx_t &, const idx_t &) const
272{
273 return getMaterialMass();
274}
275
277void Material::getMaterialMass(const Matrix &mass) const
278{
279 mass = getMaterialMass();
280}
281
283void Material::getMaterialMass(const Matrix &mass, const idx_t &ielem, const idx_t &ip) const
284{
285 mass = getMaterialMass(ielem, ip);
286}
287
289Matrix Material::getLumpedMass(const double l, const idx_t &) const
290{
291 return getLumpedMass(l);
292}
Abstract base class for material models.
Definition Material.h:37
virtual void configure(const Properties &props, const Properties &globdat)
Configure the material with given properties.
Definition Material.cpp:39
virtual void getTable(XTable &strain_table, const Vector &weights, const String &name, const IdxVector &items) const =0
Populate strain table with material-specific data.
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:243
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:42
virtual void applyDeform()=0
Apply computed deformation to the material state.