# PhasicFlow: src/Geometry/geometryMotion/geometryMotion.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.

geometryMotion.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 __geometryMotion_hpp__
#define __geometryMotion_hpp__
#include "vocabs.hpp"
#include "geometry.hpp"
namespace pFlow
{
template<typename MotionModelType>
class geometryMotion
:
public geometry
{
public:
using MotionModel = MotionModelType;
using ModelComponent = typename MotionModelType::ModelComponent;
private:
MotionModelType motionModel_;
uint32Field_D surfMotionIndex_{"triMotionIndex"};
uint32Field_D triMotionIndex_ {"surfMotionIndex"};
uint32Field_D pointMotionIndex_{"pointMotionIndex"};
Timer moveGeomTimer_;
bool findMotionIndex();
bool moveGeometry();
public:
TypeInfoTemplate11("geometry", ModelComponent);
// - Constructors
geometryMotion(systemControl& control, const property& prop);
geometryMotion(
systemControl& control,
const property& prop,
multiTriSurface& surf,
const wordVector& motionCompName,
const wordVector& materialName,
const dictionary& motionDict);
add_vCtor
(
geometry,
geometryMotion,
systemControl
);
add_vCtor
(
geometry,
geometryMotion,
dictionary
);
// - Methods
auto getModel(uint32 iter, real t, real dt)const
{
return motionModel_.getModelInterface(iter, t, dt);
}
word motionModelTypeName()const override
{
return motionModel_.typeName();
}
const uint32Field_D& triMotionIndex()const override
{
return triMotionIndex_;
}
const uint32Field_D& pointMotionIndex()const override
{
return pointMotionIndex_;
}
bool iterate() override ;
};
} // pFlow
#include "geometryMotion.cpp"
#endif //__geometryMotion_hpp__
pFlow::geometryMotion::triMotionIndex_
uint32Field_D triMotionIndex_
motion index mapped on each triangle
Definition: geometryMotion.hpp:54
pFlow::real
float real
Definition: builtinTypes.hpp:45
pFlow::demComponent::control
const auto & control() const
Const ref to systemControl.
Definition: demComponent.hpp:88
pFlow::geometryMotion::motionModel_
MotionModelType motionModel_
Ref to motion model.
Definition: geometryMotion.hpp:48
pFlow::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
pFlow::geometryMotion::ModelComponent
typename MotionModelType::ModelComponent ModelComponent
Definition: geometryMotion.hpp:43
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
pFlow::systemControl
Definition: systemControl.hpp:41
pFlow::geometryMotion::pointMotionIndex_
uint32Field_D pointMotionIndex_
motion index mapped on each point
Definition: geometryMotion.hpp:57
pFlow::geometryMotion::MotionModel
MotionModelType MotionModel
Definition: geometryMotion.hpp:41
geometryMotion.cpp
pFlow::Field< uint32 >
pFlow::geometryMotion::moveGeometry
bool moveGeometry()
Move geometry.
Definition: geometryMotion.cpp:96
pFlow
Definition: demGeometry.hpp:27
pFlow::multiTriSurface
Definition: multiTriSurface.hpp:32
pFlow::geometryMotion
Definition: geometryMotion.hpp:35
pFlow::geometryMotion::add_vCtor
add_vCtor(geometry, geometryMotion, systemControl)
Add virtual constructor.
pFlow::geometryMotion::surfMotionIndex_
uint32Field_D surfMotionIndex_
motion indext mapped on each surface
Definition: geometryMotion.hpp:51
pFlow::Timer
Definition: Timer.hpp:33
pFlow::geometryMotion::moveGeomTimer_
Timer moveGeomTimer_
timer for moveGeometry
Definition: geometryMotion.hpp:60
geometry.hpp
pFlow::geometryMotion::geometryMotion
geometryMotion(systemControl &control, const property &prop)
Definition: geometryMotion.cpp:137
pFlow::geometryMotion::iterate
bool iterate() override
Iterate geometry one time step
Definition: geometryMotion.cpp:204
pFlow::property
property holds the pure properties of materials.
Definition: property.hpp:37
pFlow::geometryMotion::findMotionIndex
bool findMotionIndex()
determine the motion index of each triangle
Definition: geometryMotion.cpp:22
pFlow::geometry
Base class for geometry for managing tri-surfaces, geometry motion, and surface physical properties.
Definition: geometry.hpp:44
pFlow::geometryMotion::pointMotionIndex
const uint32Field_D & pointMotionIndex() const override
Access to motion model index of points.
Definition: geometryMotion.hpp:122
pFlow::geometryMotion::triMotionIndex
const uint32Field_D & triMotionIndex() const override
Access to motion model index of triangles.
Definition: geometryMotion.hpp:116
pFlow::geometryMotion::TypeInfoTemplate11
TypeInfoTemplate11("geometry", ModelComponent)
Type info.
pFlow::demComponent::dt
real dt() const
Time step of integration.
Definition: demComponent.cpp:33
vocabs.hpp
pFlow::geometryMotion::getModel
auto getModel(uint32 iter, real t, real dt) const
Obtain motion model at time t.
Definition: geometryMotion.hpp:104
pFlow::Vector< word >
pFlow::geometryMotion::motionModelTypeName
word motionModelTypeName() const override
TypeName / TypeInfo of motion model.
Definition: geometryMotion.hpp:110
pFlow::dictionary
Dictionary holds a set of data entries or sub-dictionaries that are enclosed in a curely braces or ar...
Definition: dictionary.hpp:67