dynLattice
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Material Class Referenceabstract

Abstract base class for material models. More...

#include "Material.h"

Inheritance diagram for Material:
Inheritance graph
[legend]
Collaboration diagram for Material:
Collaboration graph
[legend]

Public Member Functions

 Material (const String &name, const Properties &conf, const Properties &props, const Properties &globdat)
 Constructs a new Material object.
 
virtual void configure (const Properties &props, const Properties &globdat)
 Configure the material with given properties.
 
virtual void getConfig (const Properties &conf, const Properties &globdat) const
 Retrieve current material configuration.
 
virtual void getStress (const Vector &stress, const Vector &strain)=0
 Compute stress vector from strain vector.
 
virtual void getStress (const Vector &stress, const Vector &strain, const idx_t &ielem, const idx_t &ip, const bool inelastic=true)
 Compute stress with element and integration point context.
 
virtual Matrix getMaterialStiff () const =0
 Get the material stiffness matrix.
 
virtual Matrix getMaterialStiff (const idx_t &ielem, const idx_t &ip) const
 Get the material stiffness matrix for specific element and integration point.
 
virtual void getMaterialStiff (const Matrix &stiff) const
 Write the material stiffness matrix into an existing matrix (no allocation, for hot code)
 
virtual void getMaterialStiff (const Matrix &stiff, const idx_t &ielem, const idx_t &ip) const
 Write the material stiffness matrix for an element and integration point into an existing matrix.
 
virtual Matrix getMaterialMass () const =0
 Get the material mass matrix per unit length.
 
virtual Matrix getMaterialMass (const idx_t &ielem, const idx_t &ip) const
 Get the material mass matrix for specific element and integration point.
 
virtual void getMaterialMass (const Matrix &mass) const
 Write the material mass matrix per unit length into an existing matrix (no allocation, for hot code)
 
virtual void getMaterialMass (const Matrix &mass, const idx_t &ielem, const idx_t &ip) const
 Write the material mass matrix for an element and integration point into an existing matrix.
 
virtual Matrix getLumpedMass (const double l) const
 Get the lumped mass matrix for a given element length.
 
virtual Matrix getLumpedMass (const double l, const idx_t &ielem) const
 Get the lumped mass matrix for specific element and length.
 
virtual void applyDeform ()=0
 Apply computed deformation to the material state.
 
virtual void rejectDeform ()=0
 Reject the current deformation and revert to previous state.
 
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 double getDissipatedEnergy (const idx_t &ielem, const idx_t &ip) const =0
 Get the dissipated energy at a specific integration point.
 
virtual double getPotentialEnergy (const idx_t &ielem, const idx_t &ip) const =0
 Get the potential energy at a specific integration point.
 
virtual double getHardeningPotential (const idx_t &ielem, const idx_t &ip) const =0
 Get the hardening potential energy at a specific integration point.
 
virtual String getContext () const override
 Get the context string for error reporting and debugging.
 

Static Public Attributes

static const char * VERBOSITY_PROP = "verbosity"
 Property name for verbosity level control.
 

Protected Member Functions

virtual ~Material ()
 Destroy the Material object.
 

Protected Attributes

idx_t verbosity_
 Verbosity level for material output and debugging.
 

Detailed Description

Defines interface for material behavior including stress-strain relationships, stiffness matrices, and energy calculations. Materials are created via MaterialFactory and support multiple integration points per element.

Hierarchy

Author
Til Gärtner
See also
ElasticRodMaterial, ElastoPlasticRodMaterial, MaterialFactory

Constructor & Destructor Documentation

◆ Material()

Material::Material ( const String &  name,
const Properties &  conf,
const Properties &  props,
const Properties &  globdat 
)
Parameters
[in]nameMaterial instance name for identification
[out]confConfiguration properties container for output
[in]propsInput properties for material parameters
[in]globdatGlobal data container for simulation state

◆ ~Material()

Material::~Material ( )
protectedvirtual

Virtual destructor ensures proper cleanup of derived classes. Each material type can clean up its specific resources.

Member Function Documentation

◆ applyDeform()

virtual void Material::applyDeform ( )
pure virtual

This method commits the current deformation state to the material's internal variables. It's typically called at the end of a successful load step to update the material's permanent state.

Implemented in ElasticRodMaterial, and ElastoPlasticRodMaterial.

◆ configure()

void Material::configure ( const Properties &  props,
const Properties &  globdat 
)
virtual
Parameters
[in]propsProperties containing configuration parameters
[in]globdatGlobal data container with simulation context
Exceptions
Derivedclasses may throw exceptions for invalid parameters

Reimplemented in ElasticRodMaterial, and ElastoPlasticRodMaterial.

◆ getConfig()

void Material::getConfig ( const Properties &  conf,
const Properties &  globdat 
) const
virtual
Parameters
[out]confProperties object to store configuration in
[in]globdatGlobal data container with simulation context

Reimplemented in ElasticRodMaterial, and ElastoPlasticRodMaterial.

◆ getContext()

String Material::getContext ( ) const
overridevirtual
Returns
Context string identifying this material instance
Note
0 for purely elastic materials

◆ getDissipatedEnergy()

virtual double Material::getDissipatedEnergy ( const idx_t &  ielem,
const idx_t &  ip 
) const
pure virtual

Computes the energy dissipated through inelastic processes at the specified element and integration point location.

Parameters
[in]ielemElement index
[in]ipIntegration point index within the element
Returns
Total dissipated energy at the specified location
Note
Contract: must return the value of the last committed state, i.e. it has to be stored in applyDeform(). SpecialCosseratRodModel::getEnergies_ reads it right after applyDeform() without re-evaluating strains/stresses.

Implemented in ElasticRodMaterial, and ElastoPlasticRodMaterial.

◆ getHardeningPotential()

virtual double Material::getHardeningPotential ( const idx_t &  ielem,
const idx_t &  ip 
) const
pure virtual

Computes the energy stored in hardening variables for plasticity models. This represents the energy associated with the evolution of the yield surface.

Parameters
[in]ielemElement index
[in]ipIntegration point index within the element
Returns
Hardening potential energy at the specified location

Implemented in ElasticRodMaterial, and ElastoPlasticRodMaterial.

◆ getLumpedMass() [1/2]

Matrix Material::getLumpedMass ( const double  l) const
virtual

Computes a lumped (diagonal) mass matrix for the given element length.

Parameters
[in]lElement length
Returns
Lumped mass matrix for the element

Reimplemented in ElasticRodMaterial.

◆ getLumpedMass() [2/2]

Matrix Material::getLumpedMass ( const double  l,
const idx_t &  ielem 
) const
inlinevirtual

Default element-specific lumped mass.

Element-specific version of lumped mass computation.

Parameters
[in]lElement length
[in]ielemElement index for potential customization
Returns
Lumped mass matrix for the specified element

Reimplemented in ElasticRodMaterial.

◆ getMaterialMass() [1/4]

virtual Matrix Material::getMaterialMass ( ) const
pure virtual

Computes the material mass density matrix used in dynamic analysis. The translational part of the mass matrix is typically diagonal with density values.

Returns
Mass matrix per unit length

Implemented in ElasticRodMaterial.

◆ getMaterialMass() [2/4]

Matrix Material::getMaterialMass ( const idx_t &  ielem,
const idx_t &  ip 
) const
inlinevirtual

Default element-specific mass matrix.

Enhanced version for element-specific mass computation.

Parameters
[in]ielemElement index for potential state tracking
[in]ipIntegration point index within the element
Returns
Material mass matrix for the specified location

Reimplemented in ElasticRodMaterial.

◆ getMaterialMass() [3/4]

void Material::getMaterialMass ( const Matrix &  mass) const
inlinevirtual

Default mass matrix in output form.

Parameters
[out]massMaterial mass matrix, overwritten
Note
Default implementation copies getMaterialMass()

Reimplemented in ElasticRodMaterial.

◆ getMaterialMass() [4/4]

void Material::getMaterialMass ( const Matrix &  mass,
const idx_t &  ielem,
const idx_t &  ip 
) const
inlinevirtual

Default element-specific mass matrix in output form.

Parameters
[out]massMaterial mass matrix, overwritten
[in]ielemElement index
[in]ipIntegration point index
Note
Default implementation copies getMaterialMass(ielem, ip)

Reimplemented in ElasticRodMaterial.

◆ getMaterialStiff() [1/4]

virtual Matrix Material::getMaterialStiff ( ) const
pure virtual

Computes the material stiffness matrix relating stress to strain. This matrix represents the tangent modulus of the material at the current state.

Returns
Material stiffness matrix

Implemented in ElasticRodMaterial.

◆ getMaterialStiff() [2/4]

Matrix Material::getMaterialStiff ( const idx_t &  ielem,
const idx_t &  ip 
) const
inlinevirtual

Default element-specific stiffness matrix.

Enhanced version that allows state-dependent stiffness computation.

Parameters
[in]ielemElement index for state tracking
[in]ipIntegration point index within the element
Returns
Material stiffness matrix for the specified location
Note
Default implementation delegates to getMaterialStiff()

Reimplemented in ElasticRodMaterial.

◆ getMaterialStiff() [3/4]

void Material::getMaterialStiff ( const Matrix &  stiff) const
inlinevirtual

Default stiffness matrix in output form.

Parameters
[out]stiffMaterial stiffness matrix, overwritten
Note
Default implementation copies getMaterialStiff()

Reimplemented in ElasticRodMaterial.

◆ getMaterialStiff() [4/4]

void Material::getMaterialStiff ( const Matrix &  stiff,
const idx_t &  ielem,
const idx_t &  ip 
) const
inlinevirtual

Default element-specific stiffness matrix in output form.

Parameters
[out]stiffMaterial stiffness matrix, overwritten
[in]ielemElement index
[in]ipIntegration point index
Note
Default implementation copies getMaterialStiff(ielem, ip)

Reimplemented in ElasticRodMaterial.

◆ getPotentialEnergy()

virtual double Material::getPotentialEnergy ( const idx_t &  ielem,
const idx_t &  ip 
) const
pure virtual

Computes the stored elastic energy at the specified element and integration point location.

Parameters
[in]ielemElement index
[in]ipIntegration point index within the element
Returns
Elastic potential energy at the specified location
Note
Contract: must return the value of the last committed state, i.e. it has to be stored in applyDeform(). SpecialCosseratRodModel::getEnergies_ reads it right after applyDeform() without re-evaluating strains/stresses.
0 for purely elastic materials

Implemented in ElasticRodMaterial, and ElastoPlasticRodMaterial.

◆ getStress() [1/2]

virtual void Material::getStress ( const Vector &  stress,
const Vector &  strain 
)
pure virtual

Fundamental constitutive relationship defining material response to deformation. All derived material classes must implement this method.

Parameters
[out]stressComputed stress vector at current state
[in]strainInput strain vector for stress computation
Note
For rod elements: 6-dimensional vectors (axial, shear, bending, torsion)

Implemented in ElasticRodMaterial, and ElastoPlasticRodMaterial.

◆ getStress() [2/2]

void Material::getStress ( const Vector &  stress,
const Vector &  strain,
const idx_t &  ielem,
const idx_t &  ip,
const bool  inelastic = true 
)
inlinevirtual

Default element-specific stress computation.

Parameters
[out]stressComputed stress vector
[in]strainInput strain vector
[in]ielemElement index for state tracking
[in]ipIntegration point index
[in]inelasticEnable inelastic behavior (default: true)
Note
Default delegates to getStress(stress, strain) ElastoPlasticRodMaterial overrides for plastic state management

Reimplemented in ElasticRodMaterial, and ElastoPlasticRodMaterial.

◆ getTable()

virtual void Material::getTable ( XTable &  strain_table,
const Vector &  weights,
const String &  name,
const IdxVector &  items 
) const
pure virtual

This method fills an XTable with strain-related data for output or post-processing purposes. The specific data depends on the material type.

Parameters
[out]strain_tableOutput table to populate with strain data
[in,out]weightsWeight vector for data averaging or integration
[in]nameName identifier for the table data
[in]itemsIndex vector specifying which items to include

Implemented in ElasticRodMaterial, and ElastoPlasticRodMaterial.

◆ rejectDeform()

virtual void Material::rejectDeform ( )
pure virtual

This method reverts the material to its state before the current load step. It's called when a load step fails to converge or needs to be repeated.

Implemented in ElasticRodMaterial, and ElastoPlasticRodMaterial.

Member Data Documentation

◆ verbosity_

idx_t Material::verbosity_
protected

◆ VERBOSITY_PROP

const char * Material::VERBOSITY_PROP = "verbosity"
static