15 #if !defined(KRATOS_NONLOCAL_DAMAGE_UTILITIES )
16 #define KRATOS_NONLOCAL_DAMAGE_UTILITIES
46 GaussPoint (ConstitutiveLaw::Pointer pConstitutiveLawPointer,
48 const double& IntegrationWeight)
52 Weight = IntegrationWeight;
84 KRATOS_ERROR <<
"Calling the default SearchGaussPointsNeighbours method" << std::endl;
92 double CharacteristicLength = (*pParameters)[
"characteristic_length"].GetDouble();
95 #pragma omp parallel for
96 for(
int i = 0;
i < NGPoints;
i++)
99 double LocalEquivalentStrain;
100 LocalEquivalentStrain = ReceiverPoint.
pConstitutiveLaw->GetValue(LOCAL_EQUIVALENT_STRAIN,LocalEquivalentStrain);;
101 double Numerator = ReceiverPoint.
Weight*LocalEquivalentStrain;
102 double WeightingFunctionDenominator = ReceiverPoint.
Weight;
110 LocalEquivalentStrain = SourcePoint.
pConstitutiveLaw->GetValue(LOCAL_EQUIVALENT_STRAIN,LocalEquivalentStrain);
112 Numerator += SourcePoint.
Weight*exp(-4.0*Distance*Distance/(CharacteristicLength*CharacteristicLength))*LocalEquivalentStrain;
113 WeightingFunctionDenominator += SourcePoint.
Weight*exp(-4.0*Distance*Distance/(CharacteristicLength*CharacteristicLength));
115 double NonlocalEquivalentStrain = Numerator/WeightingFunctionDenominator;
116 ReceiverPoint.
pConstitutiveLaw->SetValue(NONLOCAL_EQUIVALENT_STRAIN,NonlocalEquivalentStrain,CurrentProcessInfo);
134 KRATOS_ERROR <<
"Calling the default ComputeNeighbourDistance method" << std::endl;
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
Definition: nonlocal_damage_utilities.hpp:36
virtual void ComputeNeighbourDistance(double &rDistance, const GaussPoint &ReceiverPoint, const GaussPoint &SourcePoint)
Definition: nonlocal_damage_utilities.hpp:129
NonlocalDamageUtilities()
Default Constructor.
Definition: nonlocal_damage_utilities.hpp:69
virtual void SearchGaussPointsNeighbours(Parameters *pParameters, ModelPart &rModelPart)
Definition: nonlocal_damage_utilities.hpp:82
virtual ~NonlocalDamageUtilities()
Destructor.
Definition: nonlocal_damage_utilities.hpp:74
KRATOS_CLASS_POINTER_DEFINITION(NonlocalDamageUtilities)
std::vector< GaussPoint * > mGaussPointList
Member Variables.
Definition: nonlocal_damage_utilities.hpp:125
void CalculateNonlocalEquivalentStrain(Parameters *pParameters, const ProcessInfo &CurrentProcessInfo)
Definition: nonlocal_damage_utilities.hpp:89
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
#define KRATOS_ERROR
Definition: exception.h:161
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
int j
Definition: quadrature.py:648
integer i
Definition: TensorModule.f:17
Definition: nonlocal_damage_utilities.hpp:41
ConstitutiveLaw::Pointer pConstitutiveLaw
Definition: nonlocal_damage_utilities.hpp:56
double Weight
Definition: nonlocal_damage_utilities.hpp:58
std::vector< GaussPoint * > NeighbourPoints
Definition: nonlocal_damage_utilities.hpp:59
GaussPoint()
Definition: nonlocal_damage_utilities.hpp:43
array_1d< double, 3 > Coordinates
Definition: nonlocal_damage_utilities.hpp:57
GaussPoint(ConstitutiveLaw::Pointer pConstitutiveLawPointer, const array_1d< double, 3 > &Coords, const double &IntegrationWeight)
Definition: nonlocal_damage_utilities.hpp:46