11 #ifndef smtk_mesh_core_CellField_h
12 #define smtk_mesh_core_CellField_h
14 #include "smtk/CoreExports.h"
17 #include "smtk/mesh/core/FieldTypes.h"
18 #include "smtk/mesh/core/Handle.h"
19 #include "smtk/mesh/core/MeshSet.h"
51 bool operator==(
const CellField& other)
const;
52 bool operator!=(
const CellField& other)
const;
53 bool operator<(
const CellField& other)
const;
56 std::string name()
const {
return m_name; }
62 std::size_t size()
const;
65 std::size_t dimension()
const;
68 smtk::mesh::FieldType type()
const;
79 bool get(
const smtk::mesh::HandleRange& cellIds,
void* values)
const;
84 bool set(
const smtk::mesh::HandleRange& cellIds,
const void* values);
89 bool get(
void* values)
const;
94 bool set(
const void* values);
98 std::vector<T> get()
const
102 return std::vector<T>();
104 std::vector<T> values(size() * dimension());
105 if (!get(values.data()))
107 return std::vector<T>();
114 std::vector<T> get(
const smtk::mesh::HandleRange& cellIds)
const
118 return std::vector<T>();
120 std::vector<T> values(cellIds.size() * dimension());
121 if (!get(cellIds, values.data()))
123 return std::vector<T>();
130 bool set(
const std::vector<T>& values)
136 return set(values.data());
141 bool set(
const smtk::mesh::HandleRange& cellIds,
const std::vector<T>& values)
147 return set(cellIds, values.data());