43 namespace LibUtilities
46 PtsField::PtsField(
const int dim,
48 : m_dim(dim), m_pts(pts), m_ptsType(
ePtsFile)
81 "ptsType must be set before connectivity");
114 "Number of given fieldNames does not match the number of stored "
121 const string fieldName)
123 int nTotvars =
m_pts.num_elements();
126 "Field size mismatch");
130 for (
int i = 0; i < nTotvars; ++i)
132 newpts[i] =
m_pts[i];
134 newpts[nTotvars] = pts;
144 "number of variables mismatch");
147 for (
int i = 0; i <
m_pts.num_elements(); ++i)
150 for (
int j = 0; j <
m_pts[i].num_elements(); ++j)
152 tmp[j] =
m_pts[i][j];
154 for (
int j = 0; j < pts[i].num_elements(); ++j)
156 tmp[
m_pts[i].num_elements() + j] = pts[i][j];
164 return m_pts[0].num_elements();
169 return m_pts[fieldInd][ptInd];
176 m_pts[fieldInd][ptInd] = val;
186 return m_pts[fieldInd];
192 "Pts field count mismatch");
218 "SetPointsPerEdge only supported for ePtsLine, ePtsPlane and ePtsBox.");
std::vector< NekDouble > m_boxSize
vector of box size xmin,xmax,ymin,ymax,zmin,zmax
void SetPointsPerEdge(const std::vector< int > nPtsPerEdge)
Set the number of points per edge.
#define ASSERTL0(condition, msg)
NekDouble GetPointVal(const int fieldInd, const int ptInd) const
std::vector< Array< OneD, int > > m_ptsConn
Connectivity data needed for ePtsTetBlock and ePtsTriBlock. For n Blocks with m elements each...
void SetDim(const int ptsDim)
std::vector< int > m_nPtsPerEdge
Number of points per edge. Empty if the point data has no specific shape (ePtsLine) or is a block (eP...
void AddField(const Array< OneD, NekDouble > &pts, const std::string fieldName)
void SetPointVal(const int fieldInd, const int ptInd, const NekDouble val)
std::vector< std::string > GetFieldNames() const
std::string GetFieldName(const int i) const
void SetConnectivity(const std::vector< Array< OneD, int > > &conn)
Get the connectivity data for ePtsTetBlock and ePtsTriBlock.
Array< OneD, Array< OneD, NekDouble > > m_pts
Point data. For a n-dimensional field, the first m_dim fields are the points spatial coordinates...
void GetPts(Array< OneD, Array< OneD, NekDouble > > &pts) const
PtsType m_ptsType
Type of the PtsField.
PtsType GetPtsType() const
int m_dim
Dimension of the pts field.
void GetConnectivity(std::vector< Array< OneD, int > > &conn) const
Set the connectivity data for ePtsTetBlock and ePtsTriBlock.
void AddPoints(const Array< OneD, const Array< OneD, NekDouble > > &pts)
std::vector< NekDouble > GetBoxSize() const
std::vector< std::string > m_fieldNames
Names of the field variables.
void SetPtsType(const PtsType type)
std::vector< int > GetPointsPerEdge() const
void SetBoxSize(const std::vector< NekDouble > boxsize)
void SetFieldNames(const std::vector< std::string > fieldNames)
void SetPts(Array< OneD, Array< OneD, NekDouble > > &pts)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...