Skip to content
Snippets Groups Projects
Commit cc175e06 authored by mohib's avatar mohib
Browse files

[GenericCrackPhaseField] - Class Population + CMake inclusion

parent 5af95953
No related branches found
No related tags found
1 merge request!427[GenericCrackPhaseField] - Feature | Benchmark
......@@ -112,6 +112,7 @@ set(SRC
mullinsEffect.cpp
mlawHyperelasticWithPotential.cpp
mlawAnisotropicPlasticity.cpp
mlawGenericCrackPhaseField.cpp
# src/op_eshelby.cpp
# Headers without cpp change this ??
ID.h
......
......@@ -78,6 +78,38 @@ mlawGenericCrackPhaseField& mlawGenericCrackPhaseField::operator=(const material
return *this;
}
double mlawGenericCrackPhaseField::soundSpeed() const {
if(_matlaw == NULL) {
Msg::Error("soundSpeed: Mechanic law is null");
}
return _matlaw->soundSpeed();
}
double mlawGenericCrackPhaseField::density() const {
if(_matlaw == NULL) {
Msg::Error("density: Mechanic law is null");
}
return _matlaw->density();
}
double mlawGenericCrackPhaseField::ElasticShearModulus() const {
if(_matlaw == NULL) {
Msg::Error("ElasticShearModulus: Mechanic law is null");
}
return _matlaw->getConstNonLinearSolverMaterialLaw()->ElasticShearModulus();
}
bool mlawGenericCrackPhaseField::withEnergyDissipation() const {
if(_matlaw == NULL) {
Msg::Error("withEnergyDissipation: Mechanic law is null");
}
return _matlaw->withEnergyDissipation();
}
void mlawGenericCrackPhaseField::ElasticStiffness(STensor43 *elasticStiffness) const {
getConstNonLinearSolverMaterialLaw()->ElasticStiffness(elasticStiffness);
}
mlawGenericCrackPhaseField::~mlawGenericCrackPhaseField() {
if(_matlaw != NULL) {
delete _matlaw;
......
......@@ -9,10 +9,6 @@
#ifndef MLAWGENERICCRACKPHASEFIELD_H
#define MLAWGENERICCRACKPHASEFIELD_H
#include "mlaw.h"
#include "mlawNonLocalDamage.h"
#include "material.h"
#include "../../../gmsh/contrib/domhex/cross3D.h"
#include "../../../gmsh/contrib/untangle/mat.h"
class mlawGenericCrackPhaseField : public materialLaw{
protected:
......@@ -36,11 +32,16 @@ public:
mlawGenericCrackPhaseField(const mlawGenericCrackPhaseField& source);
virtual ~mlawGenericCrackPhaseField();
mlawGenericCrackPhaseField& operator=(const materialLaw &source);
virtual void initLaws(const std::map<int, materialLaw *> &maplaw){};
virtual double soundSpeed() const;
virtual double density() const;
virtual double ElasticShearModulus() const;
virtual void checkInternalState(IPVariable *ipv, const IPVariable *ipvprev) const{};
//irtual materialLaw* clone() const {return new mlawGenericCrackPhaseField(*this);}
//virtual materialLaw* clone() const {return new mlawGenericCrackPhaseField(*this);}
virtual bool withEnergyDissipation() const;
virtual void ElasticStiffness(STensor43 *elasticStiffness) const;
#endif //SWIG
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment