30#include "../../containers/C2DContainer.hpp"
43 using Index =
unsigned long;
47 const Index nEdge, nEdgeSIMD;
59 CEdge(
unsigned long nEdge,
unsigned long nDim);
72 inline unsigned long GetNode(
unsigned long iEdge,
unsigned long iNode)
const {
return Nodes(iEdge, iNode); }
77 template <
class T,
size_t N>
88 for (
auto iEdge = nEdge; iEdge < nEdgeSIMD; ++iEdge) {
91 Nodes(iEdge,
LEFT) = Nodes(iEdge0,
LEFT);
102 inline void SetNodes(
unsigned long iEdge,
unsigned long iPoint,
unsigned long jPoint) {
103 Nodes(iEdge,
LEFT) = iPoint;
104 Nodes(iEdge,
RIGHT) = jPoint;
161 inline void GetNormal(
unsigned long iEdge, T& normal)
const {
162 for (
auto iDim = 0ul; iDim < Normal.
cols(); iDim++) normal[iDim] = Normal(iEdge, iDim);
190 for (
auto iDim = 0ul; iDim < Normal.
cols(); ++iDim) Normal(iEdge, iDim) = normal[iDim];
200 for (
auto iDim = 0ul; iDim < Normal.
cols(); ++iDim) Normal(iEdge, iDim) += normal[iDim];
210 for (
auto iDim = 0ul; iDim < Normal.
cols(); ++iDim) Normal(iEdge, iDim) -= normal[iDim];
Index_t cols() const noexcept
Definition C2DContainer.hpp:222
static constexpr bool IsRowMajor
Definition C2DContainer.hpp:391
Class for defining the edges of the dual grid.
Definition CEdge.hpp:39
void SetNormal(unsigned long iEdge, const T &normal)
Set the normal vector of an edge.
Definition CEdge.hpp:189
simd::Array< T, N > GetNode(simd::Array< T, N > iEdge, unsigned long iNode) const
SIMD version of GetNode, iNode returned for contiguous iEdges.
Definition CEdge.hpp:78
unsigned long GetnNodes() const
Get the number of nodes of an edge (2).
Definition CEdge.hpp:110
void SetNodes_Coord(unsigned long iEdge, const su2double *coord_Edge_CG, const su2double *coord_FaceElem_CG, const su2double *coord_Elem_CG)
Set the face that corresponds to an edge (3D version).
Definition CEdge.cpp:70
void AddNormal(unsigned long iEdge, const T &normal)
Add a vector to the normal vector of an edge.
Definition CEdge.hpp:199
CEdge()=delete
No default construction.
void SubNormal(unsigned long iEdge, const T &normal)
Subtract a vector to the normal vector of an edge.
Definition CEdge.hpp:209
void GetNormal(unsigned long iEdge, T &normal) const
Copy the the normal vector of a face.
Definition CEdge.hpp:161
const su2double * GetNormal(unsigned long iEdge) const
Get the normal to a face of the control volume asociated with an edge.
Definition CEdge.hpp:170
unsigned long GetNode(unsigned long iEdge, unsigned long iNode) const
Get left/right node index defining the edge.
Definition CEdge.hpp:72
void SetPaddingNodes()
Sets the tail of "Nodes" to repeat one of the last edges.
Definition CEdge.hpp:87
static su2double GetVolume(const su2double *coord_Edge_CG, const su2double *coord_FaceElem_CG, const su2double *coord_Elem_CG, const su2double *coord_Point)
Compute the volume associated with an edge (3D version).
Definition CEdge.cpp:43
NodePosition
Definition CEdge.hpp:52
@ RIGHT
Definition CEdge.hpp:52
@ LEFT
Definition CEdge.hpp:52
void SetZeroValues(void)
Initialize normal vector to 0.
Definition CEdge.cpp:41
const su2activematrix & GetNormal() const
Get the entire matrix of edge normals.
Definition CEdge.hpp:175
void SetNodes(unsigned long iEdge, unsigned long iPoint, unsigned long jPoint)
Set the node indices of an edge.
Definition CEdge.hpp:102
Class for reading a defining the primal grid which is read from the grid file in ....
Definition CPhysicalGeometry.hpp:41
A simple SIMD type relying on implicit vectorization, i.e. done by the compiler, explicitly vectorize...
Definition vectorization.hpp:89
#define FORCEINLINE
Definition code_config.hpp:44
passivedouble su2double
Definition code_config.hpp:181
constexpr size_t preferredLen< su2double >()
Definition vectorization.hpp:68