# PhasicFlow: src/Particles/dynamicPointStructure/dynamicPointStructure.hpp Source File

dynamicPointStructure.hpp
Go to the documentation of this file.
/*------------------------------- phasicFlow ---------------------------------
O C enter of
O O E ngineering and
O O M ultiscale modeling of
OOOOOOO F luid flow
------------------------------------------------------------------------------
Copyright (C): www.cemf.ir
email: hamid.r.norouzi AT gmail.com
------------------------------------------------------------------------------
Licence:
This file is part of phasicFlow code. It is a free software for simulating
granular and multiphase flows. You can redistribute it and/or modify it under
the terms of GNU General Public License v3 or any other later versions.
phasicFlow is distributed to help others in their research in the field of
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------------------------------------------------------------------------*/
#ifndef __dynamicPointStructure_hpp__
#define __dynamicPointStructure_hpp__
#include "Time.hpp"
#include "pointFields.hpp"
#include "integrations.hpp"
#include "uniquePtr.hpp"
namespace pFlow
{
class dynamicPointStructure
:
//public pointStructure
public eventObserver
{
protected:
Time& time_;
word integrationMethod_;
pointStructure& pStruct_;
realx3PointField_D& velocity_;
uniquePtr<integration> integrationPos_;
uniquePtr<integration> integrationVel_;
public:
TypeInfo("dynamicPointStructure");
dynamicPointStructure(Time& time, const word& integrationMethod);
dynamicPointStructure(const dynamicPointStructure& ps) = default;
/*dynamicPointStructure(const dynamicPointStructure& ps):
pointStructure(ps),
time_(ps.time_),
integrationMethod_(ps.integrationMethod_),
velocity_(ps.velocity_),
integrationPos_(ps.integrationPos_->clone()),
integrationVel_(ps.integrationVel_->clone())
{
}*/
// - no move construct
dynamicPointStructure(dynamicPointStructure&&) = delete;
// - copy assignment
//
// should be changed, may causs undefined behavior
dynamicPointStructure& operator=(const dynamicPointStructure&) = default;
// - no move assignment
dynamicPointStructure& operator=(dynamicPointStructure&&) = delete;
// - destructor
virtual ~dynamicPointStructure() = default;
inline pointStructure& pStruct()
{
return pStruct_;
}
inline const pointStructure& pStruct() const
{
return pStruct_;
}
inline const realx3PointField_D& velocity()const
{
return velocity_;
}
inline auto velocityHostAll()
{
return velocity_.hostVectorAll();
}
inline auto pointPositionHostAll()
{
return pStruct_.pointPositionHostAll();
}
auto markDeleteOutOfBox(const box& domain)
{
return pStruct_.markDeleteOutOfBox(domain);
}
bool predict(real dt, realx3PointField_D& acceleration);
bool correct(real dt, realx3PointField_D& acceleration);
// - update data structure by inserting/setting new points
// Notifies all the fields in the registered list of data structure
// and exclude the fields that re in the exclusionList
// retrun nullptr if it fails
/*FUNCTION_H
virtual uniquePtr<int32IndexContainer> insertPoints(
const realx3Vector& pos,
const List<eventObserver*>& exclusionList={nullptr}
)override;*/
bool update(const eventMessage& msg) override;
};
}
#endif
pFlow::dynamicPointStructure::velocity_
realx3PointField_D & velocity_
Definition: dynamicPointStructure.hpp:46
pFlow::dynamicPointStructure::velocity
const realx3PointField_D & velocity() const
Definition: dynamicPointStructure.hpp:98
pFlow::real
float real
Definition: builtinTypes.hpp:46
pFlow::eventMessage
Definition: eventMessage.hpp:29
pFlow::dynamicPointStructure::dynamicPointStructure
dynamicPointStructure(Time &time, const word &integrationMethod)
Definition: dynamicPointStructure.cpp:25
pFlow::dynamicPointStructure::integrationMethod_
word integrationMethod_
Definition: dynamicPointStructure.hpp:42
pFlow::pointStructure::markDeleteOutOfBox
FUNCTION_H size_t markDeleteOutOfBox(const box &domain)
Definition: pointStructure.cpp:235
pFlow::dynamicPointStructure::markDeleteOutOfBox
auto markDeleteOutOfBox(const box &domain)
Definition: dynamicPointStructure.hpp:113
pFlow::word
std::string word
Definition: builtinTypes.hpp:63
pFlow::pointStructure::pointPositionHostAll
INLINE_FUNCTION_H auto pointPositionHostAll()
Definition: pointStructure.hpp:259
pointFields.hpp
pFlow::dynamicPointStructure::pointPositionHostAll
auto pointPositionHostAll()
Definition: dynamicPointStructure.hpp:108
pFlow::sphereParticlesKernels::acceleration
void acceleration(realx3 g, deviceViewType1D< real > mass, deviceViewType1D< realx3 > force, deviceViewType1D< real > I, deviceViewType1D< realx3 > torque, IncludeFunctionType incld, deviceViewType1D< realx3 > lAcc, deviceViewType1D< realx3 > rAcc)
Definition: sphereParticlesKernels.hpp:34
pFlow::eventObserver
Definition: eventObserver.hpp:33
pFlow::dynamicPointStructure::predict
bool predict(real dt, realx3PointField_D &acceleration)
Definition: dynamicPointStructure.cpp:121
pFlow::dynamicPointStructure
Definition: dynamicPointStructure.hpp:33
integrations.hpp
pFlow
Definition: demComponent.hpp:28
pFlow::dynamicPointStructure::update
bool update(const eventMessage &msg) override
Definition: dynamicPointStructure.cpp:181
pFlow::dynamicPointStructure::~dynamicPointStructure
virtual ~dynamicPointStructure()=default
uniquePtr.hpp
pFlow::pointField
Definition: pointField.hpp:35
pFlow::pointStructure
Definition: pointStructure.hpp:44
pFlow::dynamicPointStructure::correct
bool correct(real dt, realx3PointField_D &acceleration)
Definition: dynamicPointStructure.cpp:135
pFlow::dynamicPointStructure::pStruct
pointStructure & pStruct()
Definition: dynamicPointStructure.hpp:88
Time.hpp
pFlow::dynamicPointStructure::integrationVel_
uniquePtr< integration > integrationVel_
Definition: dynamicPointStructure.hpp:50
pFlow::dynamicPointStructure::pStruct
const pointStructure & pStruct() const
Definition: dynamicPointStructure.hpp:93
pFlow::dynamicPointStructure::time_
Time & time_
Definition: dynamicPointStructure.hpp:40
pFlow::dynamicPointStructure::pStruct_
pointStructure & pStruct_
Definition: dynamicPointStructure.hpp:44
pFlow::box
Definition: box.hpp:32
pFlow::dynamicPointStructure::operator=
dynamicPointStructure & operator=(const dynamicPointStructure &)=default
pFlow::uniquePtr
Definition: uniquePtr.hpp:44
pFlow::dynamicPointStructure::integrationPos_
uniquePtr< integration > integrationPos_
Definition: dynamicPointStructure.hpp:48
pFlow::dynamicPointStructure::TypeInfo
TypeInfo("dynamicPointStructure")
pFlow::dynamicPointStructure::velocityHostAll
auto velocityHostAll()
Definition: dynamicPointStructure.hpp:103
pFlow::Time
Definition: Time.hpp:39