# PhasicFlow: src/phasicFlow/triSurface/subSurface.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.

subSurface.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.
-----------------------------------------------------------------------------*/
#include "types.hpp"
#include "List.hpp"
namespace pFlow
{
class subSurface
{
private:
uint32 start_= 0;
uint32 end_ = 0;
uint32 pointStart_ = 0;
uint32 pointEnd_=0;
word name_;
public:
subSurface()=default;
subSurface(const word& name, uint32 start, uint32 end, uint32 pointStart, uint32 pointEnd)
:
start_(start),
end_(end),
pointStart_(pointStart),
pointEnd_(pointEnd),
name_(name)
{}
subSurface(const subSurface&) = default;
subSurface& operator = (const subSurface&) = default;
~subSurface()=default;
uint32 operator()(uint32 i)const
{
return start_ + i;
}
uint32 start()const
{
return start_;
}
uint32 end()const
{
return end_;
}
uint32 pointStart()const
{
return pointStart_;
}
uint32 pointEnd()const
{
return pointEnd_;
}
const auto& name()const
{
return name_;
}
uint32 size()const
{
return end_-start_;
}
uint32 numPoints()const
{
return pointEnd_ - pointStart_;
}
friend iOstream& operator<< (iOstream& str, const subSurface & sub);
friend iIstream& operator >> (iIstream & str, subSurface & sub);
};
iOstream& operator<< (iOstream& str, const subSurface & sub);
iIstream& operator >> (iIstream & str, subSurface & sub);
using subSurfaceList = List<subSurface>;
}
pFlow::List< subSurface >
pFlow::subSurface::end
uint32 end() const
Definition: subSurface.hpp:67
types.hpp
pFlow::subSurface::pointEnd
uint32 pointEnd() const
Definition: subSurface.hpp:77
List.hpp
pFlow::uint32
unsigned int uint32
Definition: builtinTypes.hpp:56
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
pFlow::subSurface::size
uint32 size() const
Definition: subSurface.hpp:87
pFlow::subSurface::subSurface
subSurface(const word &name, uint32 start, uint32 end, uint32 pointStart, uint32 pointEnd)
Definition: subSurface.hpp:43
pFlow
Definition: demGeometry.hpp:27
pFlow::subSurface::subSurface
subSurface()=default
pFlow::subSurface::name
const auto & name() const
Definition: subSurface.hpp:82
pFlow::subSurface::operator>>
friend iIstream & operator>>(iIstream &str, subSurface &sub)
operator
pFlow::iIstream
Interface class for any input stream
Definition: iIstream.hpp:37
pFlow::subSurface::pointEnd_
uint32 pointEnd_
Definition: subSurface.hpp:36
pFlow::subSurface::numPoints
uint32 numPoints() const
Definition: subSurface.hpp:92
pFlow::subSurface::start
uint32 start() const
Definition: subSurface.hpp:62
pFlow::subSurface::end_
uint32 end_
Definition: subSurface.hpp:32
pFlow::operator>>
INLINE_FUNCTION iIstream & operator>>(iIstream &str, AB3History &ab3)
Definition: AdamsBashforth3.hpp:41
pFlow::operator<<
INLINE_FUNCTION iOstream & operator<<(iOstream &str, const AB3History &ab3)
Definition: AdamsBashforth3.hpp:57
pFlow::subSurface::name_
word name_
Definition: subSurface.hpp:38
pFlow::subSurface::start_
uint32 start_
Definition: subSurface.hpp:30
pFlow::subSurface::operator=
subSurface & operator=(const subSurface &)=default
pFlow::subSurface::pointStart
uint32 pointStart() const
Definition: subSurface.hpp:72
pFlow::subSurface::pointStart_
uint32 pointStart_
Definition: subSurface.hpp:34
pFlow::subSurface::~subSurface
~subSurface()=default
pFlow::subSurface
Definition: subSurface.hpp:27
pFlow::iOstream
Interface class for any output stream.
Definition: iOstream.hpp:59
pFlow::subSurface::operator<<
friend iOstream & operator<<(iOstream &str, const subSurface &sub)
pFlow::subSurface::operator()
uint32 operator()(uint32 i) const
Definition: subSurface.hpp:58