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 return nullptr;
69}
70
72 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
73 boost::shared_ptr<PhysicalEquations> physics_ptr) {
74 return nullptr;
75};
76
77} // namespace EshelbianPlasticity
78
81#include <impl/HMHHencky.cpp>
82namespace EshelbianPlasticity {
83
85 const double c10,
86 const double K) {
88 physicalEquations = boost::make_shared<HMHNeohookean>(mField, c10, K);
90}
91
94 physicalEquations = boost::make_shared<HMHHencky>(mField, E, nu);
96}
97
99 boost::weak_ptr<MatOps::PhysicalEquations> mat_physical_equations_ptr) {
101 physicalEquations = boost::make_shared<MatPhysicalEquations>(
102 mat_physical_equations_ptr.lock());
104}
105
106}; // namespace EshelbianPlasticity
Auxilary functions for Eshelbian plasticity.
constexpr double third
Eshelbian plasticity interface.
Implementation of NeoHookean material.
#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()
ForcesAndSourcesCore::UserDataOperator UserDataOperator
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_Core(boost::weak_ptr< MatOps::PhysicalEquations > mat_physical_equations_ptr)
MoFEMErrorCode addMaterial_HMHNeohookean(const int tape, const double c10, const double K)
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 * returnOpCalculateStretchFromStress(boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< PhysicalEquations > physics_ptr)
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 * 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