NuTo
Numerics Tool
CollidableWallVirtual.h
Go to the documentation of this file.
1 /*
2  * CollidableWallCellGrid.h
3  *
4  * Created on: 5 Feb 2014
5  * Author: ttitsche
6  */
7 
8 #pragma once
9 
11 
12 namespace NuTo
13 {
14 class CollidableParticleSphere;
15 
18 {
19 public:
24  CollidableWallVirtual(Eigen::Vector3d rPosition, Eigen::Vector3d rDirection, int rIndex);
25 
32  void PerformCollision(CollidableParticleSphere& rSphere) override;
33 
38  double PredictCollision(CollidableParticleSphere& rSphere, int& rType) override;
39 
41  bool IsPhysical() const override
42  {
43  return false;
44  }
45 
46 private:
49  bool IsInOutsideBox(const CollidableParticleSphere& rSphere) const;
50 
52  void GetDistanceAligned(double& rDynamicDistance, double& rStaticDistance, bool rIsInOutsideBox,
53  CollidableParticleSphere& rSphere);
54 
56  void GetDistanceGeneral(double& rDynamicDistance, double& rStaticDistance, bool rIsInOutsideBox,
57  CollidableParticleSphere& rSphere);
58 };
59 
60 } /* namespace NuTo */
class for spherical collidables
Definition: CollidableParticleSphere.h:28
void PerformCollision(CollidableParticleSphere &rSphere) override
collision between CollidableWall and CollidableSphere Case 1) Sphere is NOT in outside box of this wa...
Definition: CollidableWallVirtual.cpp:28
virtual, inner, planar wall of the specimen
Definition: CollidableWallVirtual.h:17
Definition: Exception.h:6
base class for walls
Definition: CollidableWallBase.h:23
CollidableWallVirtual(Eigen::Vector3d rPosition, Eigen::Vector3d rDirection, int rIndex)
constructor, create CollidableWallBase using the point-and-normal-vector plane definition ...
Definition: CollidableWallVirtual.cpp:14
bool IsPhysical() const override
returns false
Definition: CollidableWallVirtual.h:41
double PredictCollision(CollidableParticleSphere &rSphere, int &rType) override
collision check between CollidableWall and CollidableSphere Predict wall transfer events ...
Definition: CollidableWallVirtual.cpp:61