SPHinXsys  alpha version
contact_body_relation.h
Go to the documentation of this file.
1 /* -----------------------------------------------------------------------------*
2  * SPHinXsys *
3  * -----------------------------------------------------------------------------*
4  * SPHinXsys (pronunciation: s'finksis) is an acronym from Smoothed Particle *
5  * Hydrodynamics for industrial compleX systems. It provides C++ APIs for *
6  * physical accurate simulation and aims to model coupled industrial dynamic *
7  * systems including fluid, solid, multi-body dynamics and beyond with SPH *
8  * (smoothed particle hydrodynamics), a meshless computational method using *
9  * particle discretization. *
10  * *
11  * SPHinXsys is partially funded by German Research Foundation *
12  * (Deutsche Forschungsgemeinschaft) DFG HU1527/6-1, HU1527/10-1, *
13  * HU1527/12-1 and HU1527/12-4. *
14  * *
15  * Portions copyright (c) 2017-2022 Technical University of Munich and *
16  * the authors' affiliations. *
17  * *
18  * Licensed under the Apache License, Version 2.0 (the "License"); you may *
19  * not use this file except in compliance with the License. You may obtain a *
20  * copy of the License at http://www.apache.org/licenses/LICENSE-2.0. *
21  * *
22  * -----------------------------------------------------------------------------*/
31 #ifndef CONTACT_BODY_RELATION_H
32 #define CONTACT_BODY_RELATION_H
33 
34 #include "base_body_relation.h"
35 #include "inner_body_relation.h"
36 
37 namespace SPH
38 {
44  {
45  protected:
46  SPHBodyParticlesIndex get_particle_index_;
47 
48  void initialization();
49 
50  public:
51  BodyRelationContact(SPHBody &sph_body, RealBodyVector contact_bodies);
52  BodyRelationContact(SPHBody &sph_body, BodyPartVector contact_body_parts);
53  virtual ~BodyRelationContact(){};
54  virtual void updateConfiguration() override;
55  };
56 
62  {
63  private:
64  UniquePtrKeeper<BodySurfaceLayer> shape_surface_ptr_keeper_;
65 
66  public:
67  BodySurfaceLayer *body_surface_layer_;
68 
69  SolidBodyRelationContact(SPHBody &sph_body, RealBodyVector contact_bodies);
70  SolidBodyRelationContact(SolidBodyRelationSelfContact &solid_body_relation_self_contact,
71  RealBodyVector contact_bodies);
72 
73  virtual ~SolidBodyRelationContact(){};
74 
75  virtual void updateConfiguration() override;
76 
77  protected:
78  IndexVector &body_part_particles_;
79  BodyPartParticlesIndex get_body_part_particle_index_;
80 
81  void initialization();
82  virtual void resetNeighborhoodCurrentSize() override;
83  };
84 
90  {
91  public:
92  BodyPart *body_part_;
93  IndexVector &body_part_particles_;
94  BodyPartParticlesIndex get_body_part_particle_index_;
95 
96  BodyPartRelationContact(BodyPart &body_part, RealBodyVector contact_bodies);
97  virtual ~BodyPartRelationContact(){};
98 
99  virtual void updateConfiguration() override;
100  };
101 
107  {
108  protected:
109  UniquePtrKeepers<NeighborRelationContactBodyPart> neighbor_relation_contact_body_part_ptr_vector_keeper_;
110 
111  public:
112  BodyPartVector contact_body_parts_;
113  StdVec<NeighborRelationContactBodyPart *> get_part_contact_neighbors_;
114 
115  BodyRelationContactToBodyPart(RealBody &real_body, BodyPartVector contact_body_parts);
116  virtual ~BodyRelationContactToBodyPart(){};
117 
118  virtual void updateConfiguration() override;
119  };
120 }
121 #endif //CONTACT_BODY_RELATION_H
The topological relations within the body.
The base relation between a SPH body and its contact SPH bodies.
Definition: base_body_relation.h:136
StdVec< size_t > IndexVector
Definition: sph_data_containers.h:37
The relation between a SPH body and its contact SPH bodies.
Definition: contact_body_relation.h:43
Definition: base_body_relation.h:41
A wrapper to provide an ownership for a new derived object which previous often generated by new a ra...
Definition: ownership.h:90
An auxillary class for SPHBody to indicate a part of the body.
Definition: base_body_part.h:45
The relation between a Body part with a SPH body.
Definition: contact_body_relation.h:89
Base classes on body and particle topology relations.
A wrapper to provide an ownership for a vector of base class pointers which point to derived objects...
Definition: ownership.h:127
A body part with the collection of particles within the surface layers of a body. ...
Definition: base_body_part.h:153
SPHBody is a base body with basic data and functions. Its derived class can be a real fluid body...
Definition: base_body.h:61
The relation for self contact of a solid body.
Definition: inner_body_relation.h:82
The relation between a SPH body and a vector of body parts.
Definition: contact_body_relation.h:106
Derived body with inner particle configuration or inner interactions. After construction, the particle and material must be specified.
Definition: base_body.h:182
The relation between a solid body and its contact solid bodies.
Definition: contact_body_relation.h:61
Definition: solid_body_supplementary.cpp:9
Definition: base_body_relation.h:47