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

plane.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 __plane_hpp__
#define __plane_hpp__
#include "infinitePlane.hpp"
#include "line.hpp"
namespace pFlow
{
class plane
:
public infinitePlane
{
private:
realx3 p1_;
realx3 p2_;
realx3 p3_;
realx3 p4_;
public:
INLINE_FUNCTION_HD
plane(){}
plane(
const realx3& p1,
const realx3& p2,
const realx3& p3,
const realx3& p4);
INLINE_FUNCTION_HD
plane(const plane&) = default;
INLINE_FUNCTION_HD
plane(plane&&) = default;
INLINE_FUNCTION_HD
plane& operator = (const plane&) = default;
INLINE_FUNCTION_HD
plane& operator =( plane&&)=default;
INLINE_FUNCTION_HD
~plane()=default;
INLINE_FUNCTION_HD
const realx3& p1()const
{
return p1_;
}
INLINE_FUNCTION_HD
const realx3& p2()const
{
return p2_;
}
INLINE_FUNCTION_HD
const realx3& p3()const
{
return p3_;
}
INLINE_FUNCTION_HD
const realx3& p4()const
{
return p4_;
}
INLINE_FUNCTION_HD
line line1()const
{
return line(p1_,p2_);
}
INLINE_FUNCTION_HD
line line2()const
{
return line(p2_,p3_);
}
INLINE_FUNCTION_HD
line line3()const
{
return line(p3_,p4_);
}
INLINE_FUNCTION_HD
line line4()const
{
return line(p4_,p1_);
}
// return the parallel plane to this plane
plane parallelPlane(real distance)const;
infinitePlane infPlane()const
{
return infinitePlane(normal(), d());
}
static
bool validPlane4(
const realx3& p1,
const realx3& p2,
const realx3& p3,
const realx3& p4);
};
}
#endif //__plane_hpp__
pFlow::plane::p4_
realx3 p4_
Fourth point.
Definition: plane.hpp:46
pFlow::infinitePlane::normal
const INLINE_FUNCTION_HD auto & normal() const
Definition: infinitePlane.hpp:155
pFlow::real
float real
Definition: builtinTypes.hpp:45
pFlow::plane
Definition: plane.hpp:30
pFlow::line
Definition: line.hpp:36
pFlow::plane::plane
INLINE_FUNCTION_HD plane()
Definition: plane.hpp:51
pFlow::plane::line2
INLINE_FUNCTION_HD line line2() const
Definition: plane.hpp:105
pFlow::infinitePlane
Definition: infinitePlane.hpp:32
pFlow::plane::line4
INLINE_FUNCTION_HD line line4() const
Definition: plane.hpp:117
pFlow::plane::line3
INLINE_FUNCTION_HD line line3() const
Definition: plane.hpp:111
pFlow::plane::p3_
realx3 p3_
Third point.
Definition: plane.hpp:43
pFlow::plane::p1_
realx3 p1_
First point.
Definition: plane.hpp:37
pFlow::plane::validPlane4
static bool validPlane4(const realx3 &p1, const realx3 &p2, const realx3 &p3, const realx3 &p4)
Definition: plane.cpp:57
pFlow::infinitePlane::infinitePlane
INLINE_FUNCTION_HD infinitePlane()
Default.
Definition: infinitePlane.hpp:51
pFlow
Definition: demGeometry.hpp:27
pFlow::plane::p3
const INLINE_FUNCTION_HD realx3 & p3() const
Definition: plane.hpp:87
pFlow::plane::parallelPlane
plane parallelPlane(real distance) const
Definition: plane.cpp:47
pFlow::plane::~plane
INLINE_FUNCTION_HD ~plane()=default
pFlow::plane::p2
const INLINE_FUNCTION_HD realx3 & p2() const
Definition: plane.hpp:81
pFlow::plane::operator=
INLINE_FUNCTION_HD plane & operator=(const plane &)=default
pFlow::plane::line1
INLINE_FUNCTION_HD line line1() const
Definition: plane.hpp:99
infinitePlane.hpp
pFlow::infinitePlane::d
const INLINE_FUNCTION_HD auto & d() const
Definition: infinitePlane.hpp:161
pFlow::plane::infPlane
infinitePlane infPlane() const
Definition: plane.hpp:125
pFlow::plane::p2_
realx3 p2_
Second point.
Definition: plane.hpp:40
pFlow::plane::p1
const INLINE_FUNCTION_HD realx3 & p1() const
Definition: plane.hpp:75
INLINE_FUNCTION_HD
#define INLINE_FUNCTION_HD
Definition: pFlowMacros.hpp:55
pFlow::triple< real >
line.hpp
pFlow::plane::p4
const INLINE_FUNCTION_HD realx3 & p4() const
Definition: plane.hpp:93