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

zAxis.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.
-----------------------------------------------------------------------------*/
/*
class name: zAxis
a class for transfering points to a cylinderical coordinates defined by points
p1 and p2
*/
#ifndef __zAxis_hpp__
#define __zAxis_hpp__
#include "types.hpp"
#include "array2D.hpp"
namespace pFlow
{
class zAxis
{
private:
using ArrayType = array2D<real,3uL,3uL>;
realx3 p1_;
realx3 p2_;
ArrayType rotMat_;
ArrayType invRotMat_;
void makeTransMatrix(const realx3& v);
public:
// constructors
zAxis(const realx3 &lp1, const realx3 &lp2);
inline
real length()const
{
return pFlow::length(p2_-p1_);
}
realx3 transferToZ(const realx3 & p)const;
realx3 transferBackZ(const realx3 & p)const;
};
}
#endif
pFlow::zAxis::makeTransMatrix
void makeTransMatrix(const realx3 &v)
Definition: zAxis.cpp:61
pFlow::real
float real
Definition: builtinTypes.hpp:45
pFlow::zAxis
Definition: zAxis.hpp:38
types.hpp
pFlow::array2D< real, 3uL, 3uL >
pFlow::zAxis::zAxis
zAxis(const realx3 &lp1, const realx3 &lp2)
Definition: zAxis.cpp:25
pFlow
Definition: demGeometry.hpp:27
pFlow::zAxis::invRotMat_
ArrayType invRotMat_
rotation matrix to rotate back from rotated coordinates to the original axis
Definition: zAxis.hpp:57
length
INLINE_FUNCTION_HD T length(const triple< T > &v1)
pFlow::zAxis::rotMat_
ArrayType rotMat_
transformation matrix to rotate original coordinates to rotated coordinates
Definition: zAxis.hpp:53
pFlow::zAxis::transferBackZ
realx3 transferBackZ(const realx3 &p) const
Definition: zAxis.cpp:50
pFlow::zAxis::p1_
realx3 p1_
the origin of the transformed coord
Definition: zAxis.hpp:46
pFlow::zAxis::transferToZ
realx3 transferToZ(const realx3 &p) const
Definition: zAxis.cpp:39
pFlow::zAxis::length
real length() const
Definition: zAxis.hpp:66
pFlow::zAxis::p2_
realx3 p2_
the direction vector of rotated coordinates
Definition: zAxis.hpp:49
array2D.hpp
pFlow::triple< real >