# PhasicFlow: src/phasicFlow/structuredData/peakableRegion/geometricRegion/geometricRegion.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.

geometricRegion.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 __geometricRegion_hpp__
#define __geometricRegion_hpp__
#include "dictionary.hpp"
#include "uniformRandomReal.hpp"
#include "typeInfo.hpp"
namespace pFlow
{
template<typename GeomType>
class geometricRegion
{
public:
using GeometryType = GeomType;
private:
GeomType geom_;
realx3 minPoint_;
realx3 maxPoint_;
mutable uniformRandomReal random_;
static constexpr uint32 maxTries_ = 100;
public:
// - type info
TypeInfoTemplateNV11("geometricRegion", GeomType);
explicit geometricRegion(const dictionary& dict);
~geometricRegion() = default;
bool isInside(const realx3& p) const;
realx3 peek() const;
const auto& minPoint()const
{
return minPoint_;
}
const auto& maxPoint()const
{
return maxPoint_;
}
bool read(const dictionary& dict);
bool write(dictionary& dict) const;
};
} // namespace pFlow
#include "geometricRegion.cpp"
#endif
pFlow::geometricRegion::maxTries_
static constexpr uint32 maxTries_
Definition: geometricRegion.hpp:49
pFlow::geometricRegion::geom_
GeomType geom_
Definition: geometricRegion.hpp:41
pFlow::geometricRegion::minPoint_
realx3 minPoint_
Definition: geometricRegion.hpp:43
pFlow::geometricRegion::~geometricRegion
~geometricRegion()=default
pFlow::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
pFlow::geometricRegion::maxPoint
const auto & maxPoint() const
Definition: geometricRegion.hpp:70
pFlow::geometricRegion::geometricRegion
geometricRegion(const dictionary &dict)
Definition: geometricRegion.cpp:22
pFlow::geometricRegion::minPoint
const auto & minPoint() const
Definition: geometricRegion.hpp:65
pFlow
Definition: demGeometry.hpp:27
pFlow::uniformRandomReal
Definition: uniformRandomReal.hpp:32
pFlow::geometricRegion::GeometryType
GeomType GeometryType
Definition: geometricRegion.hpp:37
dictionary.hpp
pFlow::geometricRegion::isInside
bool isInside(const realx3 &p) const
Definition: geometricRegion.cpp:32
uniformRandomReal.hpp
geometricRegion.cpp
pFlow::geometricRegion::read
bool read(const dictionary &dict)
Definition: geometricRegion.cpp:57
pFlow::geometricRegion::write
bool write(dictionary &dict) const
Definition: geometricRegion.cpp:64
pFlow::geometricRegion::maxPoint_
realx3 maxPoint_
Definition: geometricRegion.hpp:45
pFlow::geometricRegion
Definition: geometricRegion.hpp:33
typeInfo.hpp
pFlow::geometricRegion::random_
uniformRandomReal random_
Definition: geometricRegion.hpp:47
pFlow::geometricRegion::peek
realx3 peek() const
Definition: geometricRegion.cpp:39
pFlow::triple< real >
pFlow::geometricRegion::TypeInfoTemplateNV11
TypeInfoTemplateNV11("geometricRegion", GeomType)
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