www.cemf.ir
zAxis.hpp
Go to the documentation of this file.
1 /*------------------------------- phasicFlow ---------------------------------
2  O C enter of
3  O O E ngineering and
4  O O M ultiscale modeling of
5  OOOOOOO F luid flow
6 ------------------------------------------------------------------------------
7  Copyright (C): www.cemf.ir
8  email: hamid.r.norouzi AT gmail.com
9 ------------------------------------------------------------------------------
10 Licence:
11  This file is part of phasicFlow code. It is a free software for simulating
12  granular and multiphase flows. You can redistribute it and/or modify it under
13  the terms of GNU General Public License v3 or any other later versions.
14 
15  phasicFlow is distributed to help others in their research in the field of
16  granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
17  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 
19 -----------------------------------------------------------------------------*/
20 
21 
22 /*
23 class name: zAxis
24 a class for transfering points to a cylinderical coordinates defined by points
25 p1 and p2
26 */
27 
28 #ifndef __zAxis_hpp__
29 #define __zAxis_hpp__
30 
31 #include "types.hpp"
32 #include "array2D.hpp"
33 
34 namespace pFlow
35 {
36 
37 
38 class zAxis
39 {
40 
41 private:
42 
44 
47 
50 
54 
58 
59  void makeTransMatrix(const realx3& v);
60 
61 public:
62  // constructors
63  zAxis(const realx3 &lp1, const realx3 &lp2);
64 
65  inline
66  real length()const
67  {
68  return pFlow::length(p2_-p1_);
69  }
70 
71  realx3 transferToZ(const realx3 & p)const;
72 
73  realx3 transferBackZ(const realx3 & p)const;
74 
75 
76 };
77 
78 
79 }
80 
81 #endif
82 
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 >