SPHinXsys  alpha version
inner_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  * -----------------------------------------------------------------------------*/
29 #ifndef INNER_BODY_RELATION_H
30 #define INNER_BODY_RELATION_H
31 
32 #include "base_body_relation.h"
33 
34 namespace SPH
35 {
41  {
42  protected:
43  SPHBodyParticlesIndex get_particle_index_;
44  SearchDepthSingleResolution get_single_search_depth_;
45  NeighborRelationInner get_inner_neighbor_;
46  CellLinkedList *cell_linked_list_;
47 
48  public:
49  explicit BodyRelationInner(RealBody &real_body);
50  virtual ~BodyRelationInner(){};
51 
52  virtual void updateConfiguration() override;
53  };
54 
60  {
61  private:
62  UniquePtrKeepers<SearchDepthVariableSmoothingLength> search_variable_smoothinglength_ptr_vector_keeper_;
63 
64  protected:
65  size_t total_levels_;
66  SPHBodyParticlesIndex get_particle_index_;
67  StdVec<SearchDepthVariableSmoothingLength *> get_multi_level_search_depth_;
68  NeighborRelationInnerVariableSmoothingLength get_inner_neighbor_variable_smoothing_length_;
69  StdVec<CellLinkedList *> cell_linked_list_levels_;
70 
71  public:
74 
75  virtual void updateConfiguration() override;
76  };
77 
83  {
84  public:
85  BodySurfaceLayer body_surface_layer_;
86 
87  explicit SolidBodyRelationSelfContact(RealBody &real_body);
88  virtual ~SolidBodyRelationSelfContact(){};
89 
90  virtual void updateConfiguration() override;
91 
92  protected:
93  IndexVector &body_part_particles_;
94  BodyPartParticlesIndex get_body_part_particle_index_;
95  SearchDepthSingleResolution get_single_search_depth_;
96  NeighborRelationSelfContact get_self_contact_neighbor_;
97  CellLinkedList *cell_linked_list_;
98 
99  virtual void resetNeighborhoodCurrentSize() override;
100  };
101 
107  {
108  protected:
109  TreeBody &generative_tree_;
110 
111  public:
112  explicit TreeBodyRelationInner(RealBody &real_body)
113  : BodyRelationInner(real_body),
114  generative_tree_(DynamicCast<TreeBody>(this, real_body)){};
115  virtual ~TreeBodyRelationInner(){};
116 
117  virtual void updateConfiguration() override;
118  };
119 }
120 #endif //INNER_BODY_RELATION_H
Defining a mesh cell linked list for a body. The meshes for all bodies share the same global coordina...
Definition: cell_linked_list.h:113
StdVec< size_t > IndexVector
Definition: sph_data_containers.h:37
The relation within a SPH body with smoothing length adaptation.
Definition: inner_body_relation.h:59
The first concrete relation within a SPH body.
Definition: inner_body_relation.h:40
Definition: base_body_relation.h:41
A inner neighbor relation functor between particles i and j.
Definition: neighbor_relation.h:102
Definition: base_body_relation.h:56
The tree is composed of a root (the first branch) and other branch generated sequentially.
Definition: complex_body.h:61
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
A inner neighbor relation functor between particles i and j.
Definition: neighbor_relation.h:114
The abstract relation within a SPH body.
Definition: base_body_relation.h:117
A solid contact neighbor relation functor between particles i and j.
Definition: neighbor_relation.h:129
The relation for self contact of a solid body.
Definition: inner_body_relation.h:82
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 within a reduced SPH body, viz. network.
Definition: inner_body_relation.h:106
Definition: solid_body_supplementary.cpp:9
Definition: base_body_relation.h:47