41 static_assert(D == 2 || D == 3,
"Only D=2 and D=3 are supported");
56template <
typename T,
unsigned D,
bool CONVEX>
66 std::array<std::size_t, 1> particleID;
68 std::array<unsigned, 1> wallID;
70 std::array<T, 1> dampingFactor = {-1};
72 std::array<bool, 1> particlePositionUpdated = {
false};
74 std::array<bool, 1> newContact = {
true};
76 std::array<int, 1> responsibleRank = {std::numeric_limits<int>::max()};
79 static const std::size_t serialSize =
80 sizeof(particlePositionUpdated) +
sizeof(newContact) +
81 sizeof(particlePosition) +
sizeof(min) +
sizeof(max) +
82 sizeof(particleID) +
sizeof(wallID) +
sizeof(responsibleRank) +
83 sizeof(dampingFactor);
86 std::size_t processWithCommunicatables(F f);
89 static_assert(D == 2 || D == 3,
"Only D=2 and D=3 are supported");
124 const T initialRelativeVelocityMagnitude);
139 constexpr bool isEmpty()
const;
141 constexpr bool isNew()
const;
143 constexpr void isNew(
const bool newContact);
156 std::size_t
serialize(std::uint8_t* buffer);
Top level namespace for all of OpenLB.
constexpr bool isParticlePositionUpdated() const
Returns if the particle position is up-to-date.
constexpr void setResponsibleRank(const int &rank)
Set processor that is responsible for contact treatment.
constexpr void setDampingFactor(const T dampingFactor)
Set damping factor for contact.
void print()
Print relevant quantities.
constexpr void setParticlePosition(const PhysR< T, D > &particlePosition)
Set particle position.
constexpr void setDampingFactorFromInitialVelocity(const T coefficientOfRestitution, const T initialRelativeVelocityMagnitude)
Set damping factor from the magnitude of the initial relative impact velocity in direction of contact...
constexpr void setParticlePositionUpdated(bool updated)
constexpr const std::size_t & getParticleID() const
Read access to particle ID.
constexpr const PhysR< T, D > & getMin() const
Read access to min.
constexpr T getDampingFactor() const
Read access to damping factor.
std::size_t serialize(std::uint8_t *buffer)
Serialize contact data.
static constexpr std::size_t getSerialSize()
Get serial size.
constexpr void resetMinMax()
Reset min and max to default values.
constexpr unsigned getWallID() const
Read access to wall matreial.
constexpr const int & getResponsibleRank() const
Read access to the responsible rank.
constexpr const PhysR< T, D > & getParticlePosition() const
Return particle position.
WallContactArbitraryFromOverlapVolume< T, D, CONVEX > & operator=(const WallContactArbitraryFromOverlapVolume< T, D, CONVEX > &contact)
Copy assignment.
WallContactArbitraryFromOverlapVolume()
Constructor.
constexpr bool isEmpty() const
Returns if contact holds data.
constexpr const PhysR< T, D > & getMax() const
Read access to max.
std::size_t deserialize(std::uint8_t *buffer)
Deserialize contact data and save in object.
constexpr void combineWith(WallContactArbitraryFromOverlapVolume< T, D, CONVEX > &contact)
Combining two contacts, if the particle IDs are the same.
constexpr bool isNew() const
Returns if the contact is a new contact.
constexpr void increaseMinMax(const Vector< T, D > &increaseBy)
Increase bounding box size.
constexpr void updateMinMax(const PhysR< T, D > &positionInsideTheContact)
Update min and max with given position inside the contact.
static const std::vector< unsigned int > indicesDim
static const std::vector< unsigned int > indicesSingle
Set of functions commonly used in LB computations – header file.