Advanced Multi-Physics (AMP)
On-Line Documentation
MechanicsModel.h
Go to the documentation of this file.
1#ifndef included_AMP_MechanicsModel
2#define included_AMP_MechanicsModel
3
4#include <cstring>
5
6#include "AMP/materials/Material.h"
7#include "AMP/operators/ElementPhysicsModel.h"
8#include "AMP/operators/MechanicsModelParameters.h"
9#include "AMP/vectors/Vector.h"
10#include <memory>
11
12
13namespace AMP::Operator {
14
16{
17public:
19 explicit MechanicsModel( std::shared_ptr<const MechanicsModelParameters> &params )
20 : ElementPhysicsModel( params )
21 {
22 bool useMaterialsLibrary =
23 params->d_db->getWithDefault<bool>( "USE_MATERIALS_LIBRARY", false );
24 if ( useMaterialsLibrary == true ) {
25 AMP_INSIST( ( params->d_db->keyExists( "Material" ) ), "Key ''Material'' is missing!" );
26 std::string matname = params->d_db->getString( "Material" );
28 }
29 }
30
32 virtual ~MechanicsModel() {}
33
37 virtual void reset( std::shared_ptr<MechanicsModelParameters> params )
38 {
39 d_deformationGradient = params->d_deformationGradient;
40 }
41
44 virtual void getTangent( std::shared_ptr<AMP::LinearAlgebra::Vector> tangent ) {}
45
48 virtual void getStress( std::shared_ptr<AMP::LinearAlgebra::Vector> stress ) {}
49
50protected:
52 std::shared_ptr<AMP::Materials::Material> d_material;
53
56 std::shared_ptr<AMP::LinearAlgebra::Vector> d_deformationGradient;
57};
58} // namespace AMP::Operator
59
60#endif
virtual void reset(std::shared_ptr< MechanicsModelParameters > params)
MechanicsModel(std::shared_ptr< const MechanicsModelParameters > &params)
std::shared_ptr< AMP::LinearAlgebra::Vector > d_deformationGradient
virtual void getTangent(std::shared_ptr< AMP::LinearAlgebra::Vector > tangent)
std::shared_ptr< AMP::Materials::Material > d_material
virtual void getStress(std::shared_ptr< AMP::LinearAlgebra::Vector > stress)
#define AMP_INSIST(EXP, MSG)
Insist error.
std::unique_ptr< Material > getMaterial(const std::string &name)
Get a material.



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:41.
Comments on this page