Skip to content
Snippets Groups Projects
Commit 4d801a47 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Fix management list of constant cell ids

parent a9d711ce
No related branches found
No related tags found
1 merge request!128Feature/unit tests
......@@ -56,10 +56,10 @@ class IntegrateOnCells<OutputType(InputType)> : public PugsFunctionAdapter<Outpu
class CellList
{
private:
const Array<CellId>& m_cell_list;
const Array<const CellId>& m_cell_list;
public:
using index_type = Array<CellId>::index_type;
using index_type = Array<const CellId>::index_type;
PUGS_INLINE
CellId
......@@ -76,7 +76,7 @@ class IntegrateOnCells<OutputType(InputType)> : public PugsFunctionAdapter<Outpu
}
PUGS_INLINE
CellList(const Array<CellId>& cell_list) : m_cell_list{cell_list} {}
CellList(const Array<const CellId>& cell_list) : m_cell_list{cell_list} {}
};
template <typename MeshType, typename OutputArrayT, typename ListTypeT>
......@@ -609,7 +609,7 @@ class IntegrateOnCells<OutputType(InputType)> : public PugsFunctionAdapter<Outpu
integrate(const FunctionSymbolId& function_symbol_id,
const IQuadratureDescriptor& quadrature_descriptor,
const MeshType& mesh,
const ArrayT<CellId>& cell_list)
const ArrayT<const CellId>& cell_list)
{
ArrayT<OutputType> value(size(cell_list));
if (quadrature_descriptor.isTensorial()) {
......@@ -622,6 +622,16 @@ class IntegrateOnCells<OutputType(InputType)> : public PugsFunctionAdapter<Outpu
return value;
}
template <typename MeshType, template <typename DataType> typename ArrayT>
static PUGS_INLINE ArrayT<OutputType>
integrate(const FunctionSymbolId& function_symbol_id,
const IQuadratureDescriptor& quadrature_descriptor,
const MeshType& mesh,
const ArrayT<CellId>& cell_list)
{
return integrate(function_symbol_id, quadrature_descriptor, mesh, ArrayT<const CellId>{cell_list});
}
};
#endif // INTEGRATE_ON_CELLS_HPP
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment