# PhasicFlow: src/Particles/dynamicPointStructure/dynamicPointStructure.hpp Source File
PhasicFlow is an open-source parallel DEM (discrete element method) package for simulating granular flow. It is developed in C++ and can be exectued on both GPU (like CUDA) and CPU.

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 "integration.hpp"
#include "uniquePtr.hpp"
namespace pFlow
{
class systemControl;
class dynamicPointStructure
:
public pointStructure
{
private:
realx3PointField_D velocity_;
uniquePtr<integration> integrationPos_ = nullptr;
uniquePtr<integration> integrationVel_ = nullptr;
Timer velocityUpdateTimer_;
word integrationMethod_;
public:
TypeInfo("dynamicPointStructure");
explicit dynamicPointStructure(systemControl& control);
dynamicPointStructure(const dynamicPointStructure& ps) = delete;
// - no move construct
dynamicPointStructure(dynamicPointStructure&&) = delete;
dynamicPointStructure& operator=(const dynamicPointStructure&) = delete;
// - no move assignment
dynamicPointStructure& operator=(dynamicPointStructure&&) = delete;
// - destructor
~dynamicPointStructure() override = default;
inline
const realx3PointField_D& velocity()const
{
return velocity_;
}
inline
realx3PointField_D& velocity()
{
return velocity_;
}
bool beforeIteration() override;
bool iterate() override;
bool predict(real dt, realx3PointField_D& acceleration);
bool correct(real dt, realx3PointField_D& acceleration);
};
}
#endif
pFlow::grainParticlesKernels::acceleration
void acceleration(const realx3 &g, const deviceViewType1D< real > &mass, const deviceViewType1D< realx3 > &force, const deviceViewType1D< real > &I, const deviceViewType1D< realx3 > &torque, const pFlagTypeDevice &incld, deviceViewType1D< realx3 > lAcc, deviceViewType1D< realx3 > rAcc)
Definition: grainParticlesKernels.cpp:62
pFlow::dynamicPointStructure::velocity
const realx3PointField_D & velocity() const
Definition: dynamicPointStructure.hpp:74
pFlow::real
float real
Definition: builtinTypes.hpp:45
pFlow::dynamicPointStructure::operator=
dynamicPointStructure & operator=(const dynamicPointStructure &)=delete
pFlow::demComponent::control
const auto & control() const
Const ref to systemControl.
Definition: demComponent.hpp:88
pFlow::dynamicPointStructure::velocity_
realx3PointField_D velocity_
Definition: dynamicPointStructure.hpp:41
pFlow::dynamicPointStructure::velocity
realx3PointField_D & velocity()
Definition: dynamicPointStructure.hpp:80
pFlow::dynamicPointStructure::integrationMethod_
word integrationMethod_
integration method for velocity and position
Definition: dynamicPointStructure.hpp:50
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
pFlow::systemControl
Definition: systemControl.hpp:41
pointFields.hpp
pFlow::dynamicPointStructure::iterate
bool iterate() override
This is called in time loop.
Definition: dynamicPointStructure.cpp:94
pFlow::dynamicPointStructure::dynamicPointStructure
dynamicPointStructure(systemControl &control)
Definition: dynamicPointStructure.cpp:25
pFlow::dynamicPointStructure::beforeIteration
bool beforeIteration() override
In the time loop before iterate.
Definition: dynamicPointStructure.cpp:83
pFlow::dynamicPointStructure::predict
bool predict(real dt, realx3PointField_D &acceleration)
prediction step (if any), is called in beforeIteration
Definition: dynamicPointStructure.cpp:104
pFlow::dynamicPointStructure
Definition: dynamicPointStructure.hpp:35
pFlow
Definition: demGeometry.hpp:27
uniquePtr.hpp
pFlow::pointField
Definition: pointField.hpp:33
pFlow::pointStructure
Definition: pointStructure.hpp:34
pFlow::Timer
Definition: Timer.hpp:33
pFlow::dynamicPointStructure::correct
bool correct(real dt, realx3PointField_D &acceleration)
correction step, is called in iterate
Definition: dynamicPointStructure.cpp:116
Time.hpp
pFlow::dynamicPointStructure::integrationVel_
uniquePtr< integration > integrationVel_
Definition: dynamicPointStructure.hpp:45
pFlow::dynamicPointStructure::velocityUpdateTimer_
Timer velocityUpdateTimer_
Definition: dynamicPointStructure.hpp:47
pFlow::uniquePtr
Definition: uniquePtr.hpp:42
pFlow::dynamicPointStructure::integrationPos_
uniquePtr< integration > integrationPos_
Definition: dynamicPointStructure.hpp:43
integration.hpp
pFlow::dynamicPointStructure::TypeInfo
TypeInfo("dynamicPointStructure")
pFlow::dynamicPointStructure::~dynamicPointStructure
~dynamicPointStructure() override=default
pFlow::demComponent::dt
real dt() const
Time step of integration.
Definition: demComponent.cpp:33