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

Add DiscreteFunctionP0::fill utility

parent 377831ba
No related branches found
No related tags found
1 merge request!89Add missing compatibility check when affecting lists to R^d or R^dxd
...@@ -50,6 +50,14 @@ class DiscreteFunctionP0 : public IDiscreteFunction ...@@ -50,6 +50,14 @@ class DiscreteFunctionP0 : public IDiscreteFunction
return m_discrete_function_descriptor; return m_discrete_function_descriptor;
} }
PUGS_INLINE
void
fill(const DataType& data) const noexcept
{
static_assert(not std::is_const_v<DataType>, "Cannot modify ItemValue of const");
m_cell_values.fill(data);
}
PUGS_FORCEINLINE PUGS_FORCEINLINE
DataType& DataType&
operator[](const CellId cell_id) const noexcept(NO_ASSERT) operator[](const CellId cell_id) const noexcept(NO_ASSERT)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment