42 namespace LibUtilities
45 PtsField::PtsField(
const int dim,
47 : m_dim(dim), m_pts(pts), m_ptsType(
ePtsFile)
80 "ptsType must be set before connectivity");
113 "Number of given fieldNames does not match the number of stored " 120 const string fieldName)
122 size_t nTotvars =
m_pts.num_elements();
125 "Field size mismatch");
129 for (
size_t i = 0; i < nTotvars; ++i)
131 newpts[i] =
m_pts[i];
133 newpts[nTotvars] = pts;
143 size_t nTotvars =
m_pts.num_elements();
147 for (
size_t i = 0, j = 0; i < nTotvars; ++i)
151 newpts[j++] =
m_pts[i];
163 "number of variables mismatch");
166 for (
size_t i = 0; i <
m_pts.num_elements(); ++i)
169 for (
size_t j = 0; j <
m_pts[i].num_elements(); ++j)
171 tmp[j] =
m_pts[i][j];
173 for (
size_t j = 0; j < pts[i].num_elements(); ++j)
175 tmp[
m_pts[i].num_elements() + j] = pts[i][j];
183 return m_pts[0].num_elements();
188 return m_pts[fieldInd][ptInd];
195 m_pts[fieldInd][ptInd] = val;
205 return m_pts[fieldInd];
211 "Pts field count mismatch");
237 "SetPointsPerEdge only supported for ePtsLine, ePtsPlane and ePtsBox.");
std::vector< NekDouble > m_boxSize
vector of box size xmin,xmax,ymin,ymax,zmin,zmax
#define ASSERTL0(condition, msg)
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)
size_t m_dim
Dimension of the pts field.
void RemoveField(const std::string fieldName)
size_t GetNpoints() const
void AddField(const Array< OneD, NekDouble > &pts, const std::string fieldName)
std::vector< std::string > GetFieldNames() const
NekDouble GetPointVal(const size_t fieldInd, const size_t ptInd) 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...
PtsType m_ptsType
Type of the PtsField.
void AddPoints(const Array< OneD, const Array< OneD, NekDouble > > &pts)
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< NekDouble > GetBoxSize() const
void SetPointsPerEdge(const std::vector< size_t > nPtsPerEdge)
Set the number of points per edge.
std::vector< size_t > GetPointsPerEdge() const
void GetPts(Array< OneD, Array< OneD, NekDouble > > &pts) const
std::vector< std::string > m_fieldNames
Names of the field variables.
void SetPtsType(const PtsType type)
std::string GetFieldName(const int i) const
size_t GetNFields() const
PtsType GetPtsType() const
void SetBoxSize(const std::vector< NekDouble > boxsize)
void SetFieldNames(const std::vector< std::string > fieldNames)
void SetPts(Array< OneD, Array< OneD, NekDouble > > &pts)
void GetConnectivity(std::vector< Array< OneD, int > > &conn) const
Set the connectivity data for ePtsTetBlock and ePtsTriBlock.
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
void SetPointVal(const size_t fieldInd, const size_t ptInd, const NekDouble val)