5 #if !defined(KRATOS_SPHERIC_CONTINUUM_PARTICLE_H_INCLUDED )
6 #define KRATOS_SPHERIC_CONTINUUM_PARTICLE_H_INCLUDED
17 #include "custom_utilities/AuxiliaryFunctions.h"
56 while (
i <
int(mpThisParticle->mNeighbourElements.size()) && (mpThisParticle->mNeighbourElements[
i]==NULL)){
60 if (
i <
int(mpThisParticle->mNeighbourElements.size())) {
61 SetCurrentNeighbour(mpThisParticle->mNeighbourElements[
i]);
62 mpOtherParticleNode = &(mpOtherParticle->GetGeometry()[0]);
67 mpOtherParticle = NULL;
68 mpOtherParticleNode = NULL;
76 return std::unique_ptr<SphericParticle::ParticleDataBuffer>(
new ParticleDataBuffer(p_this_particle));
79 virtual void SetInitialSphereContacts(
const ProcessInfo& r_process_info);
80 void SetInitialFemContacts();
81 virtual void CreateContinuumConstitutiveLaws();
82 void FinalizeSolutionStep(
const ProcessInfo& r_process_info)
override;
83 void GetStressTensorFromNeighbourStep1();
84 void GetStressTensorFromNeighbourStep2();
85 void GetStressTensorFromNeighbourStep3();
89 void ReorderAndRecoverInitialPositionsAndFilter(std::vector<SphericParticle*>& mTempNeighbourElements);
90 virtual void UpdateContinuumNeighboursVector(
const ProcessInfo& r_process_info);
91 virtual void ReorderFEMneighbours();
92 virtual void ComputeForceWithNeighbourFinalOperations();
94 virtual double CalculateMaxSearchDistance(
const bool has_mpi,
const ProcessInfo& r_process_info);
95 virtual bool OverlappedParticleRemoval();
96 virtual void CalculateMeanContactArea(
const bool has_mpi,
const ProcessInfo& r_process_info);
97 virtual void CalculateOnContinuumContactElements(
size_t i_neighbour_count,
double LocalElasticContactForce[3],
double ElasticLocalRotationalMoment[3],
98 double contact_sigma,
double contact_tau,
double failure_criterion_state,
double acumulated_damage,
int time_steps,
double calculation_area);
101 virtual void FilterNonSignificantDisplacements(
double DeltDisp[3],
103 double& indentation);
107 virtual void ContactAreaWeighting();
108 virtual double EffectiveVolumeRadius();
109 virtual double GetInitialDelta(
int index);
110 virtual bool IsSkin() {
return (
bool)*mSkinSphere; }
111 void MarkNewSkinParticlesDueToBreakage();
114 virtual std::string
Info()
const override
116 std::stringstream buffer;
117 buffer <<
"SphericCosntinuumParticle" ;
122 virtual void PrintInfo(std::ostream& rOStream)
const override {rOStream <<
"SphericContinuumParticle";}
125 virtual void PrintData(std::ostream& rOStream)
const override {}
136 double mLocalRadiusAmplificationFactor = 1.0;
137 double mLocalJointNormal[3];
143 void Initialize(
const ProcessInfo& r_process_info)
override;
144 virtual double GetInitialDeltaWithFEM(
int index)
override;
149 virtual void ComputeBrokenBondsRatio();
150 virtual void AddContributionToRepresentativeVolume(
const double distance,
151 const double radius_sum,
152 const double contact_area);
162 virtual void save(
Serializer& rSerializer)
const override
168 rSerializer.
save(
"mContinuumInitialNeighborsSize",mContinuumInitialNeighborsSize);
177 rSerializer.
load(
"mContinuumInitialNeighborsSize",mContinuumInitialNeighborsSize);
178 mContinuumGroup = this->GetGeometry()[0].FastGetSolutionStepValue(COHESIVE_GROUP);
179 mSkinSphere = &(this->GetGeometry()[0].FastGetSolutionStepValue(SKIN_SPHERE));
196 rOStream << std::endl;
std::size_t IndexType
Definition: flags.h:74
typename TContainerType::iterator ptr_iterator
Definition: global_pointers_vector.h:85
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
void load(std::string const &rTag, TDataType &rObject)
Definition: serializer.h:207
void save(std::string const &rTag, std::array< TDataType, TDataSize > const &rObject)
Definition: serializer.h:545
Definition: spheric_continuum_particle.h:48
ParticleDataBuffer(SphericParticle *p_this_particle)
Definition: spheric_continuum_particle.h:50
bool SetNextNeighbourOrExit(int &i) override
Definition: spheric_continuum_particle.h:54
virtual ~ParticleDataBuffer()
Definition: spheric_continuum_particle.h:52
Definition: spheric_continuum_particle.h:26
std::vector< double > mIniNeighbourDelta
Definition: spheric_continuum_particle.h:131
GlobalPointersVector< Element > ParticleWeakVectorType
Definition: spheric_continuum_particle.h:32
int mContinuumGroup
Definition: spheric_continuum_particle.h:128
std::unique_ptr< SphericParticle::ParticleDataBuffer > CreateParticleDataBuffer(SphericParticle *p_this_particle) override
Definition: spheric_continuum_particle.h:74
double * mSkinSphere
Definition: spheric_continuum_particle.h:154
ParticleWeakVectorType::ptr_iterator ParticleWeakIteratorType_ptr
Definition: spheric_continuum_particle.h:33
GlobalPointersVector< Element >::iterator ParticleWeakIteratorType
Definition: spheric_continuum_particle.h:34
std::vector< Kratos::DEMContinuumConstitutiveLaw::Pointer > mContinuumConstitutiveLawArray
Definition: spheric_continuum_particle.h:135
virtual void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: spheric_continuum_particle.h:122
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: spheric_continuum_particle.h:125
unsigned int mInitialNeighborsSize
Definition: spheric_continuum_particle.h:134
std::vector< int > mIniNeighbourIds
Definition: spheric_continuum_particle.h:129
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(SphericContinuumParticle)
Pointer definition of SphericContinuumParticle.
virtual std::string Info() const override
Turn back information as a string.
Definition: spheric_continuum_particle.h:114
std::vector< double > mFemIniNeighbourDelta
Definition: spheric_continuum_particle.h:156
unsigned int mContinuumInitialNeighborsSize
Definition: spheric_continuum_particle.h:133
std::vector< int > mIniNeighbourFailureId
Definition: spheric_continuum_particle.h:130
std::vector< int > mFemIniNeighbourIds
Definition: spheric_continuum_particle.h:155
virtual bool IsSkin()
Definition: spheric_continuum_particle.h:110
Definition: spheric_particle.h:59
Definition: spheric_particle.h:31
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
Modeler::Pointer Create(const std::string &ModelerName, Model &rModel, const Parameters ModelParameters)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:30
TDataType Calculate(GeometryType &dummy, const Variable< TDataType > &rVariable)
Definition: add_geometries_to_python.cpp:103
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
def load(f)
Definition: ode_solve.py:307
integer i
Definition: TensorModule.f:17