44 std::vector<NekDouble> coord1,
45 std::vector<NekDouble> coord2,
46 std::vector<unsigned int> numModes,
47 std::vector<unsigned int> numPoints)
48 :
RefRegion(coordim, radius, coord1, coord2, numModes, numPoints)
65 const size_t dim = coords.size();
91 NekDouble e_mod =
sqrt(e[0] * e[0] + e[1] * e[1] + e[2] * e[2]);
95 exrpa[0] = e[1] * rpa[2] - e[2] * rpa[1];
96 exrpa[1] = e[2] * rpa[0] - e[0] * rpa[2];
97 exrpa[2] = e[0] * rpa[1] - e[1] * rpa[0];
100 sqrt(exrpa[0] * exrpa[0] + exrpa[1] * exrpa[1] + exrpa[2] * exrpa[2]);
102 d = exrpa_mod / e_mod;
113 mpexrp[0] = m[0] + e[1] * coords[2] - e[2] * coords[1];
114 mpexrp[1] = m[1] + e[2] * coords[0] - e[0] * coords[2];
115 mpexrp[2] = m[2] + e[0] * coords[1] - e[1] * coords[0];
119 numerator[0] = e[1] * mpexrp[2] - e[2] * mpexrp[1];
120 numerator[1] = e[2] * mpexrp[0] - e[0] * mpexrp[2];
121 numerator[2] = e[0] * mpexrp[1] - e[1] * mpexrp[0];
125 rq[0] = coords[0] + (numerator[0] / pow(e_mod, 2));
126 rq[1] = coords[1] + (numerator[1] / pow(e_mod, 2));
127 rq[2] = coords[2] + (numerator[2] / pow(e_mod, 2));
135 NekDouble m_mod =
sqrt(m[0] * m[0] + m[1] * m[1] + m[2] * m[2]);
137 ASSERTL0(m_mod,
"The cylinder axis must not go through the origin");
145 sqrt(rqxrb[0] * rqxrb[0] + rqxrb[1] * rqxrb[1] + rqxrb[2] * rqxrb[2]);
153 sqrt(rqxra[0] * rqxra[0] + rqxra[1] * rqxra[1] + rqxra[2] * rqxra[2]);
156 wa = rqxrb_mod / m_mod;
158 wb = rqxra_mod / m_mod;
162 if ((wa >= 0) && (wa <= 1) && (wb >= 0) && (wb <= 1))
#define ASSERTL0(condition, msg)
bool v_Contains(const Array< OneD, NekDouble > &coords) override
Check if vertex is inside the surface region.
RefRegionCylinder(const unsigned int coordim, NekDouble radius, std::vector< NekDouble > coord1, std::vector< NekDouble > coord2, std::vector< unsigned int > numModes, std::vector< unsigned int > numPoints)
Constructor.
~RefRegionCylinder() override
Destructor.
Abstract base class for the refinement surface region.
std::vector< NekDouble > m_coord2
Coordinate 2.
std::vector< NekDouble > m_coord1
Coordinate 1.
NekDouble m_radius
Radius of the surface region.
std::vector< double > d(NPUPPER *NPUPPER)
scalarT< T > sqrt(scalarT< T > in)