# PhasicFlow: src/Particles/Insertion/InsertionRegion/InsertionRegion.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.

InsertionRegion.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 __InsertionRegion_hpp__
#define __InsertionRegion_hpp__
#include "insertionRegion.hpp"
#include "dictionary.hpp"
#include "pointStructure.hpp"
#include "insertion.hpp"
#include "collisionCheck.hpp"
#include "pStructSelector.hpp"
#include "fieldSelector.hpp"
namespace pFlow
{
template<typename ShapeType>
class InsertionRegion
: public insertionRegion
{
private:
const ShapeType& shapes_;
static bool checkForContact(
const realx3Vector& pos,
const realVector& diams,
const realx3& p,
const real& d
);
public:
TypeInfoTemplateNV11("insertionRegion", ShapeType);
// - Constructors
InsertionRegion(
const word& name,
const insertion& instn,
const ShapeType& shapes
);
~InsertionRegion() = default;
// - Methods
bool insertParticles(
uint32 iter,
real t,
real dt,
wordVector& names,
realx3Vector& pos,
bool& insertionOccured
);
// bool read(const dictionary& dict);
// bool write(dictionary& dict)const;
};
} // pFlow
#include "InsertionRegion.cpp"
#endif
pFlow::InsertionRegion::shapes_
const ShapeType & shapes_
Ref to Shapes.
Definition: InsertionRegion.hpp:48
pFlow::real
float real
Definition: builtinTypes.hpp:45
pFlow::InsertionRegion::TypeInfoTemplateNV11
TypeInfoTemplateNV11("insertionRegion", ShapeType)
Type info.
insertion.hpp
pFlow::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
pFlow::InsertionRegion::checkForContact
static bool checkForContact(const realx3Vector &pos, const realVector &diams, const realx3 &p, const real &d)
Definition: InsertionRegion.cpp:23
pFlow::InsertionRegion
This manages insertion of particles from a region based on the ShapeType.
Definition: InsertionRegion.hpp:42
pFlow::insertionRegion
This class defines all the necessary enteties for defining an insertion region.
Definition: insertionRegion.hpp:86
pFlow
Definition: demGeometry.hpp:27
pStructSelector.hpp
pFlow::insertionRegion::name
const auto & name() const
Const ref to name of the region.
Definition: insertionRegion.hpp:151
pFlow::InsertionRegion::~InsertionRegion
~InsertionRegion()=default
collisionCheck.hpp
pFlow::InsertionRegion::InsertionRegion
InsertionRegion(const word &name, const insertion &instn, const ShapeType &shapes)
Construct from dictionary.
Definition: InsertionRegion.cpp:41
dictionary.hpp
insertionRegion.hpp
InsertionRegion.cpp
fieldSelector.hpp
pFlow::InsertionRegion::insertParticles
bool insertParticles(uint32 iter, real t, real dt, wordVector &names, realx3Vector &pos, bool &insertionOccured)
Insert particles at current time t Check if currentTime is the right moment for particle insertion.
Definition: InsertionRegion.cpp:54
pFlow::triple< real >
pFlow::Vector< realx3 >
pointStructure.hpp
pFlow::insertion
Base class for particle insertion.
Definition: insertion.hpp:35