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

Add tests for InterpolateItemValue and proceed to a few clean-up

parent f4e45f73
No related branches found
No related tags found
1 merge request!89Add missing compatibility check when affecting lists to R^d or R^dxd
......@@ -15,7 +15,7 @@ class InterpolateItemValue<OutputType(InputType)> : public PugsFunctionAdapter<O
public:
template <ItemType item_type>
static inline ItemValue<OutputType, item_type>
PUGS_INLINE static ItemValue<OutputType, item_type>
interpolate(const FunctionSymbolId& function_symbol_id, const ItemValue<const InputType, item_type>& position)
{
auto& expression = Adapter::getFunctionExpression(function_symbol_id);
......@@ -46,7 +46,7 @@ class InterpolateItemValue<OutputType(InputType)> : public PugsFunctionAdapter<O
}
template <ItemType item_type>
static inline Array<OutputType>
PUGS_INLINE static Array<OutputType>
interpolate(const FunctionSymbolId& function_symbol_id,
const ItemValue<const InputType, item_type>& position,
const Array<const ItemIdT<item_type>>& list_of_items)
......@@ -77,6 +77,15 @@ class InterpolateItemValue<OutputType(InputType)> : public PugsFunctionAdapter<O
return value;
}
template <ItemType item_type>
PUGS_INLINE static Array<OutputType>
interpolate(const FunctionSymbolId& function_symbol_id,
const ItemValue<const InputType, item_type>& position,
const Array<ItemIdT<item_type>>& list_of_items)
{
return interpolate(function_symbol_id, position, Array<const ItemIdT<item_type>>{list_of_items});
}
};
#endif // INTERPOLATE_ITEM_VALUE_HPP
......@@ -103,6 +103,7 @@ add_executable (mpi_unit_tests
mpi_test_main.cpp
test_DiscreteFunctionP0.cpp
test_DiscreteFunctionP0Vector.cpp
test_InterpolateItemValue.cpp
test_ItemArray.cpp
test_ItemArrayUtils.cpp
test_ItemValue.cpp
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment