Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GeoMechanicsApplication] Some more cleanup in custom_constitutive #11499

Merged
merged 1 commit into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ void BilinearCohesive3DLaw::GetLawFeatures(Features& rFeatures)
rFeatures.mStrainSize = GetStrainSize();
}

int BilinearCohesive3DLaw::
Check(const Properties& rMaterialProperties,
const GeometryType& rElementGeometry,
const ProcessInfo& rCurrentProcessInfo) const
int BilinearCohesive3DLaw::Check(const Properties& rMaterialProperties,
const GeometryType& rElementGeometry,
const ProcessInfo& rCurrentProcessInfo) const
{
// Verify Properties variables
if (rMaterialProperties.Has( CRITICAL_DISPLACEMENT ) == false || rMaterialProperties[CRITICAL_DISPLACEMENT] <= 0.0)
Expand Down Expand Up @@ -69,10 +68,9 @@ ConstitutiveLaw::Pointer BilinearCohesive3DLaw::Clone() const
return p_clone;
}

void BilinearCohesive3DLaw::
InitializeMaterial( const Properties& rMaterialProperties,
const GeometryType& rElementGeometry,
const Vector& rShapeFunctionsValues )
void BilinearCohesive3DLaw::InitializeMaterial(const Properties& rMaterialProperties,
const GeometryType& rElementGeometry,
const Vector& rShapeFunctionsValues)
{
mStateVariable = rMaterialProperties[DAMAGE_THRESHOLD];
}
Expand Down Expand Up @@ -192,7 +190,7 @@ void BilinearCohesive3DLaw::FinalizeMaterialResponseCauchy( Parameters& rValues
rValues.CheckAllParameters();

//Initialize main variables
Vector& rStrainVector = rValues.GetStrainVector();
const Vector& rStrainVector = rValues.GetStrainVector();
double EquivalentStrain;

//Material properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ class KRATOS_API(GEO_MECHANICS_APPLICATION) LinearElastic2DBeamLaw
///@name Protected Operations
///@{

// /**
// * @brief It calculates the constitutive matrix C
// * @param C The constitutive matrix
// * @param rValues Parameters of the constitutive law
// */
/**
* @brief It calculates the constitutive matrix C
* @param C The constitutive matrix
* @param rValues Parameters of the constitutive law
*/
void CalculateElasticMatrix(Matrix& C, ConstitutiveLaw::Parameters& rValues) override;

void CalculatePK2Stress(const Vector& rStrainVector,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,11 @@ class KRATOS_API(GEO_MECHANICS_APPLICATION) LinearElastic2DInterfaceLaw
///@name Protected Operations
///@{

// /**
// * @brief It calculates the constitutive matrix C
// * @param C The constitutive matrix
// * @param rValues Parameters of the constitutive law
// */
/**
* @brief It calculates the constitutive matrix C
* @param C The constitutive matrix
* @param rValues Parameters of the constitutive law
*/
void CalculateElasticMatrix(Matrix& C, ConstitutiveLaw::Parameters& rValues) override;

/**
Expand All @@ -165,13 +165,6 @@ class KRATOS_API(GEO_MECHANICS_APPLICATION) LinearElastic2DInterfaceLaw
Vector& rStressVector,
ConstitutiveLaw::Parameters& rValues) override;

// /**
// * @brief It calculates the strain vector
// * @param rValues The internal values of the law
// * @param rStrainVector The strain vector in Voigt notation
// */
// void CalculateCauchyGreenStrain(ConstitutiveLaw::Parameters& rValues, Vector& rStrainVector) override;

///@}

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@
// Main authors: Vahid Galavi
//

#if !defined (KRATOS_LINEAR_ELASTIC_3D_INTERFACE_LAW_GEO_H_INCLUDED)
#define KRATOS_LINEAR_ELASTIC_3D_INTERFACE_LAW_GEO_H_INCLUDED

// System includes

// External includes
#pragma once

// Project includes
#include "custom_constitutive/linear_elastic_2D_interface_law.h"
Expand Down Expand Up @@ -153,11 +148,11 @@ class KRATOS_API(GEO_MECHANICS_APPLICATION) LinearElastic3DInterfaceLaw
///@name Protected Operations
///@{

// /**
// * @brief It calculates the constitutive matrix C
// * @param C The constitutive matrix
// * @param rValues Parameters of the constitutive law
// */
/**
* @brief It calculates the constitutive matrix C
* @param C The constitutive matrix
* @param rValues Parameters of the constitutive law
*/
void CalculateElasticMatrix(Matrix& C, ConstitutiveLaw::Parameters& rValues) override;

/**
Expand All @@ -170,13 +165,6 @@ class KRATOS_API(GEO_MECHANICS_APPLICATION) LinearElastic3DInterfaceLaw
Vector& rStressVector,
ConstitutiveLaw::Parameters& rValues) override;

// /**
// * @brief It calculates the strain vector
// * @param rValues The internal values of the law
// * @param rStrainVector The strain vector in Voigt notation
// */
// void CalculateCauchyGreenStrain(ConstitutiveLaw::Parameters& rValues, Vector& rStrainVector) override;

///@}

private:
Expand Down Expand Up @@ -217,5 +205,4 @@ class KRATOS_API(GEO_MECHANICS_APPLICATION) LinearElastic3DInterfaceLaw
KRATOS_SERIALIZE_LOAD_BASE_CLASS( rSerializer, LinearElastic2DInterfaceLaw)
}
}; // Class LinearElastic2DInterfaceLaw
} // namespace Kratos.
#endif // KRATOS_LINEAR_PLANE_STRAIN_K0_LAW_H_INCLUDED defined
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
// System includes
#include <iostream>

// External includes

// Project includes
#include "custom_constitutive/linear_elastic_plane_strain_2D_law.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,6 @@ class KRATOS_API(GEO_MECHANICS_APPLICATION) GeoLinearElasticPlaneStrain2DLaw
Vector& rStressVector,
ConstitutiveLaw::Parameters& rValues) override;

// /**
// * @brief It calculates the strain vector
// * @param rValues The internal values of the law
// * @param rStrainVector The strain vector in Voigt notation
// */
// void CalculateCauchyGreenStrain(ConstitutiveLaw::Parameters& rValues, Vector& rStrainVector) override;

///@}

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ ConstitutiveLaw::Pointer LinearPlaneStrainK0Law::Clone() const
bool& LinearPlaneStrainK0Law::GetValue(const Variable<bool>& rThisVariable, bool& rValue)
{
// This Constitutive Law has been checked with Stenberg Stabilization
if (rThisVariable == STENBERG_SHEAR_STABILIZATION_SUITABLE) {
rValue = true;
}
if (rThisVariable == STENBERG_SHEAR_STABILIZATION_SUITABLE) rValue = true;

return rValue;
}
Expand Down Expand Up @@ -134,7 +132,6 @@ void LinearPlaneStrainK0Law::CalculatePK2Stress(const Vector& rStrainVector,

void LinearPlaneStrainK0Law::CalculateCauchyGreenStrain(Parameters& rValues, Vector& rStrainVector)
{

//1.-Compute total deformation gradient
const Matrix& F = rValues.GetDeformationGradientF();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ ConstitutiveLaw::Pointer GeoLinearElasticPlaneStress2DLaw::Clone() const
bool& GeoLinearElasticPlaneStress2DLaw::GetValue(const Variable<bool>& rThisVariable, bool& rValue)
{
// This Constitutive Law has been checked with Stenberg Stabilization
if (rThisVariable == STENBERG_SHEAR_STABILIZATION_SUITABLE)
rValue = true;
if (rThisVariable == STENBERG_SHEAR_STABILIZATION_SUITABLE) rValue = true;

return rValue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,21 +162,19 @@ class KRATOS_API(GEO_MECHANICS_APPLICATION) GeoLinearElasticPlaneStress2DLaw
* @param rStressVector The stress vector in Voigt notation
* @param rValues Parameters of the constitutive law
*/
void CalculatePK2Stress(
const Vector& rStrainVector,
Vector& rStressVector,
ConstitutiveLaw::Parameters& rValues
) override;
void CalculatePK2Stress(const Vector& rStrainVector,
Vector& rStressVector,
ConstitutiveLaw::Parameters& rValues
) override;

/**
* It calculates the strain vector
* @param rValues The internal values of the law
* @param rStrainVector The strain vector in Voigt notation
*/
void CalculateCauchyGreenStrain(
ConstitutiveLaw::Parameters& rValues,
Vector& rStrainVector
) override;
void CalculateCauchyGreenStrain(ConstitutiveLaw::Parameters& rValues,
Vector& rStrainVector
) override;

///@}

Expand Down
Loading