45 : m_dim(dim), m_pts(pts), m_ptsType(
ePtsFile)
78 "ptsType must be set before connectivity");
111 "Number of given fieldNames does not match the number of stored "
118 const string fieldName)
120 size_t nTotvars =
m_pts.size();
122 ASSERTL1(pts.size() >=
m_pts[0].size(),
"Field size mismatch");
126 for (
size_t i = 0; i < nTotvars; ++i)
128 newpts[i] =
m_pts[i];
139 size_t nTotvars =
m_pts.size();
143 for (
size_t i = 0, j = 0; i < nTotvars; ++i)
147 newpts[j++] =
m_pts[i];
160 ASSERTL1(pts.size() ==
m_pts.size(),
"number of variables mismatch");
163 for (
size_t i = 0; i <
m_pts.size(); ++i)
166 for (
size_t j = 0; j <
m_pts[i].size(); ++j)
168 tmp[j] =
m_pts[i][j];
170 for (
size_t j = 0; j < pts[i].size(); ++j)
172 tmp[
m_pts[i].size() + j] = pts[i][j];
180 return m_pts[0].size();
185 return m_pts[fieldInd][ptInd];
191 m_pts[fieldInd][ptInd] = val;
201 return m_pts[fieldInd];
206 ASSERTL1(pts.size() ==
m_pts.size(),
"Pts field count mismatch");
239 "SetPointsPerEdge only supported for ePtsLine, ePtsPlane and ePtsBox.");
#define ASSERTL0(condition, msg)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
std::vector< int > GetPointsPerElement() const
size_t GetNpoints() const
void SetBoxSize(const std::vector< NekDouble > boxsize)
NekDouble GetPointVal(const size_t fieldInd, const size_t ptInd) const
size_t GetNFields() const
std::vector< std::string > GetFieldNames() const
std::vector< size_t > GetPointsPerEdge() const
void SetFieldNames(const std::vector< std::string > fieldNames)
std::vector< Array< OneD, int > > m_ptsConn
Connectivity data needed for ePtsTetBlock and ePtsTriBlock. For n Blocks with m elements each,...
void SetPointVal(const size_t fieldInd, const size_t ptInd, const NekDouble val)
PtsType GetPtsType() const
void SetDim(const int ptsDim)
PtsField(const int dim, const Array< OneD, Array< OneD, NekDouble > > &pts)
std::vector< NekDouble > GetBoxSize() const
size_t m_dim
Dimension of the pts field.
std::vector< size_t > m_nPtsPerEdge
Number of points per edge. Empty if the point data has no specific shape (ePtsLine) or is a block (eP...
std::vector< int > m_nPtsPerElement
std::string GetFieldName(const int i) const
void SetPointsPerElement(const std::vector< int > nPtsPerElement)
void GetConnectivity(std::vector< Array< OneD, int > > &conn) const
Set the connectivity data for ePtsTetBlock and ePtsTriBlock.
PtsType m_ptsType
Type of the PtsField.
std::vector< std::string > m_fieldNames
Names of the field variables.
std::vector< NekDouble > m_boxSize
vector of box size xmin,xmax,ymin,ymax,zmin,zmax
void SetPts(Array< OneD, Array< OneD, NekDouble > > &pts)
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 SetConnectivity(const std::vector< Array< OneD, int > > &conn)
Get the connectivity data for ePtsTetBlock and ePtsTriBlock.
void RemoveField(const std::string fieldName)
void SetPointsPerEdge(const std::vector< size_t > nPtsPerEdge)
Set the number of points per edge.
void SetPtsType(const PtsType type)
void AddPoints(const Array< OneD, const Array< OneD, NekDouble > > &pts)
void GetPts(Array< OneD, Array< OneD, NekDouble > > &pts) const
void AddField(const Array< OneD, NekDouble > &pts, const std::string fieldName)