7 #ifndef cf3_mesh_ElementData_hpp
8 #define cf3_mesh_ElementData_hpp
27 template<
typename NodeValuesT,
typename RowT>
30 const Uint nb_nodes = element_row.size();
32 const Uint end = start+dim;
33 for(
Uint node = 0; node != nb_nodes; ++node)
36 for(
Uint j = start; j != end; ++j)
37 to_fill[node][j-start] = data_row[j];
42 template<
typename RowT,
int NbRows,
int NbCols>
45 for(
int node = 0; node != NbRows; ++node)
48 for(
Uint j = 0; j != NbCols; ++j)
49 to_fill(node, j) = data_row[j+start];
54 template<
typename RowT>
57 const Uint nb_nodes = element_row.size();
59 const Uint end = start+dim;
60 for(
Uint node = 0; node != nb_nodes; ++node)
63 for(
Uint j = start; j != end; ++j)
64 to_fill(node, j-start) = data_row[j];
120 template<U
int NbNodes, U
int NbRows, U
int NbCols=1>
124 template<U
int NbNodes>
127 static const Uint nb_nodes = NbNodes;
130 static const Uint node_size = 1;
147 template<
typename RowT>
150 for(
Uint i = 0; i != nb_nodes; ++i)
152 m_data[i] = &data_array[element_row[i]][start];
157 Real* m_data[NbNodes];
161 template<
typename RowT>
164 const Uint row_size = row.size();
166 for(
Uint i =0; i != row_size; ++i)
178 #endif // cf3_mesh_ElementData_hpp
const Real & operator[](const Uint i) const
RealVector to_vector(const RowT &row)
Utility function to convert a vector-like type to a RealVector.
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic > RealMatrix
Dynamic sized matrix of Real scalars.
Real & operator[](const Uint i)
View of nodal data, allowing modification of the referenced data.
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealVector
Dynamic sized column vector.
void fill(common::Table< Real > &data_array, const RowT &element_row, const Uint start=0)
TableConstRow< ValueT >::type ConstRow
the const type of a row in the internal structure of the table
Top-level namespace for coolfluid.
void fill(NodeValuesT &to_fill, const common::Table< Real > &data_array, const RowT &element_row, const Uint start=0)
Fill STL-vector like per-node data storage.
Uint row_size(Uint i=0) const
unsigned int Uint
typedef for unsigned int