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

iBox.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 __iBox_hpp__
#define __iBox_hpp__
#include "types.hpp"
#include "dictionary.hpp"
#include "iIstream.hpp"
#include "iOstream.hpp"
namespace pFlow
{
template<typename intType>
class iBox
{
protected:
// - min point
triple<intType> min_;
// - max point
triple<intType> max_;
public:
// - type info
TypeInfoTemplateNV11("iBox", intType);
INLINE_FUNCTION_HD
iBox();
INLINE_FUNCTION_HD
iBox(const triple<intType> & minP, const triple<intType> & maxP);
FUNCTION_H
iBox(const dictionary& dict);
FUNCTION_H
iBox(iIstream& is);
FUNCTION_HD
iBox(const iBox&) = default;
FUNCTION_HD
iBox(iBox&&) = default;
FUNCTION_HD
iBox& operator=(const iBox&) = default;
FUNCTION_HD
iBox& operator=(iBox&&) = default;
~iBox()=default;
INLINE_FUNCTION_HD
bool isInside(const triple<intType> & point)const;
INLINE_FUNCTION_HD
const triple<intType> & minPoint()const
{
return min_;
}
INLINE_FUNCTION_HD
const triple<intType> & maxPoint()const
{
return max_;
}
FUNCTION_H
bool read(iIstream & is);
FUNCTION_H
bool write(iOstream& os)const;
FUNCTION_H
bool read(const dictionary& dict);
FUNCTION_H
bool write(dictionary& dict)const;
};
template<typename intType>
FUNCTION_H
iIstream& operator >> (iIstream& is, iBox<intType>& b);
template<typename intType>
FUNCTION_H
iOstream& operator << (iOstream& os, const iBox<intType>& b);
}
#include "iBox.cpp"
#endif
pFlow::iBox::operator=
FUNCTION_HD iBox & operator=(const iBox &)=default
pFlow::iBox::isInside
INLINE_FUNCTION_HD bool isInside(const triple< intType > &point) const
Definition: iBox.cpp:76
iIstream.hpp
types.hpp
pFlow
Definition: demGeometry.hpp:27
pFlow::iBox::iBox
INLINE_FUNCTION_HD iBox()
Definition: iBox.cpp:24
FUNCTION_H
#define FUNCTION_H
Definition: pFlowMacros.hpp:62
pFlow::iBox::~iBox
~iBox()=default
iBox.cpp
pFlow::iBox::max_
triple< intType > max_
Definition: iBox.hpp:41
pFlow::iBox::maxPoint
const INLINE_FUNCTION_HD triple< intType > & maxPoint() const
Definition: iBox.hpp:87
pFlow::iIstream
Interface class for any input stream
Definition: iIstream.hpp:37
pFlow::iBox::min_
triple< intType > min_
Definition: iBox.hpp:38
dictionary.hpp
pFlow::operator>>
INLINE_FUNCTION iIstream & operator>>(iIstream &str, AB3History &ab3)
Definition: AdamsBashforth3.hpp:41
pFlow::iBox::write
FUNCTION_H bool write(iOstream &os) const
Definition: iBox.cpp:94
pFlow::operator<<
INLINE_FUNCTION iOstream & operator<<(iOstream &str, const AB3History &ab3)
Definition: AdamsBashforth3.hpp:57
FUNCTION_HD
#define FUNCTION_HD
Definition: pFlowMacros.hpp:61
pFlow::iBox::TypeInfoTemplateNV11
TypeInfoTemplateNV11("iBox", intType)
iOstream.hpp
pFlow::iBox
Definition: iBox.hpp:33
INLINE_FUNCTION_HD
#define INLINE_FUNCTION_HD
Definition: pFlowMacros.hpp:55
pFlow::triple< intType >
pFlow::iOstream
Interface class for any output stream.
Definition: iOstream.hpp:59
pFlow::iBox::minPoint
const INLINE_FUNCTION_HD triple< intType > & minPoint() const
Definition: iBox.hpp:81
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
pFlow::iBox::read
FUNCTION_H bool read(iIstream &is)
Definition: iBox.cpp:85