v0.16.0
Loading...
Searching...
No Matches
EshelbianMat.cpp
Go to the documentation of this file.
1/**
2 * \file EshelbianMat.cpp
3 * \brief Implementation of automatic differentiation
4 */
5
6#include <MoFEM.hpp>
7using namespace MoFEM;
8
9#include <MatrixFunction.hpp>
10
12
13#include <EshelbianAux.hpp>
14
16
17#include <boost/math/constants/constants.hpp>
18
19constexpr double third = boost::math::constants::third<double>();
20
21namespace EshelbianPlasticity {
22
24 const bool eval_rhs, const bool eval_lhs,
25 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
26 boost::shared_ptr<PhysicalEquations> physics_ptr) {
27 return nullptr;
28}
29
31 const std::string &field_name,
32 boost::shared_ptr<DataAtIntegrationPts> data_ptr, const double alpha_u) {
33 return nullptr;
34}
35
37 const std::string &field_name,
38 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
39 boost::shared_ptr<ExternalStrainVec> external_strain_vec_ptr,
40 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv) {
41 return nullptr;
42}
43
45 std::string row_field, std::string col_field,
46 boost::shared_ptr<DataAtIntegrationPts> data_ptr, const double alpha) {
47 return nullptr;
48}
49
51 const std::string &field_name,
52 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
53 SmartPetscObj<Vec> assemble_vec,
54 boost::shared_ptr<TopologicalData> topo_ptr, const double alpha_u,
55 boost::shared_ptr<double> J_ptr) {
56 return nullptr;
57}
58
60 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
61 boost::shared_ptr<double> total_energy_ptr) {
62 return nullptr;
63}
64
66 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
67 boost::shared_ptr<PhysicalEquations> physics_ptr,
68 boost::shared_ptr<MatrixDouble> strain_ptr) {
69 return nullptr;
70}
71
73 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
74 boost::shared_ptr<PhysicalEquations> physics_ptr,
75 boost::shared_ptr<MatrixDouble> strain_ptr,
76 VectorPtr external_pressure_ptr) {
78 std::move(data_ptr), std::move(physics_ptr), std::move(strain_ptr));
79}
80
82 VectorPtr external_pressure_ptr,
83 boost::shared_ptr<ExternalStrainVec> external_strain_vec_ptr,
84 std::map<std::string, boost::shared_ptr<ScalingMethod>> smv) {
85 return nullptr;
86}
87
89 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
90 boost::shared_ptr<PhysicalEquations> physics_ptr) {
91 return nullptr;
92};
93
94} // namespace EshelbianPlasticity
95
97#include <impl/HMHStorakers.cpp>
99#include <impl/HMHHencky.cpp>
100namespace EshelbianPlasticity {
101
103 const double K) {
105 physicalEquations = boost::make_shared<HMHNeohookean>(mField, c10, K);
107}
108
110 const double mu,
111 const double beta) {
113 physicalEquations = boost::make_shared<HMHStorakers>(mField, eta, mu, beta);
115}
116
119 physicalEquations = boost::make_shared<HMHHencky>(mField, E, nu);
121}
122
124 boost::weak_ptr<MatOps::PhysicalEquations> mat_physical_equations_ptr) {
126 physicalEquations = boost::make_shared<MatPhysicalEquations>(
127 mat_physical_equations_ptr.lock());
129}
130
131}; // namespace EshelbianPlasticity
Auxilary functions for Eshelbian plasticity.
constexpr double third
Eshelbian plasticity interface.
Abaqus-compatible compressible Neo-Hookean material in principal stretches.
Storakers material model.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
double eta
ForcesAndSourcesCore::UserDataOperator UserDataOperator
boost::shared_ptr< VectorDouble > VectorPtr
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
Definition Common.hpp:10
constexpr auto field_name
MoFEMErrorCode addMaterial_Hencky(double E, double nu)
MoFEMErrorCode addMaterial_HMHStorakers(const double eta, const double mu, const double beta)
MoFEMErrorCode addMaterial_HMHNeohookean(const double c10, const double K)
MoFEMErrorCode addMaterial_Core(boost::weak_ptr< MatOps::PhysicalEquations > mat_physical_equations_ptr)
virtual VolUserDataOperator * returnOpCalculateExternalPressure(VectorPtr external_pressure_ptr, boost::shared_ptr< ExternalStrainVec > external_strain_vec_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv)
virtual VolUserDataOperator * returnOpCalculateVarStretchFromStress(boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
virtual VolUserDataOperator * returnOpCalculateEnergy(boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< double > total_energy_ptr)
virtual UserDataOperator * returnOpJacobian(const bool eval_rhs, const bool eval_lhs, boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
virtual VolUserDataOperator * returnOpSpatialPhysical(const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha_u)
virtual VolUserDataOperator * returnOpSpatialPhysicalExternalStrain(const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< ExternalStrainVec > external_strain_vec_ptr, std::map< std::string, boost::shared_ptr< ScalingMethod > > smv)
virtual VolUserDataOperator * returnOpTopoSpatialPhysical(const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, SmartPetscObj< Vec > assemble_vec, boost::shared_ptr< TopologicalData > topo_ptr, const double alpha_u, boost::shared_ptr< double > J_ptr)
virtual VolUserDataOperator * returnOpCalculateStretchFromStress(boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr, boost::shared_ptr< MatrixDouble > strain_ptr=nullptr)
virtual VolUserDataOperator * returnOpSpatialPhysical_du_du(std::string row_field, std::string col_field, boost::shared_ptr< DataAtIntegrationPts > data_ptr, const double alpha)
intrusive_ptr for managing petsc objects