mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
add bool parameter ComplexType to EclMpiSerializer::map
this is passed on to the serializeOp template for the underlying type. used with maps over DynamicState where DynamicState is over a non-complex type.
This commit is contained in:
parent
e87ec7b5a4
commit
f0bc3e3815
@ -81,15 +81,20 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
template<template<class Key, class Data> class Map, class Key, class Data>
|
||||
void map(Map<Key, Data>& data)
|
||||
template<class Map, bool complexType = true>
|
||||
void map(Map& data)
|
||||
{
|
||||
using Key = typename Map::key_type;
|
||||
using Data = typename Map::mapped_type;
|
||||
|
||||
auto handle = [&](auto& d)
|
||||
{
|
||||
if constexpr (is_vector<Data>::value)
|
||||
vector(d);
|
||||
else if constexpr (is_shared_ptr<Data>::value)
|
||||
shared_ptr(d);
|
||||
else if constexpr (!complexType)
|
||||
d.template serializeOp<EclMpiSerializer, false>(*this);
|
||||
else
|
||||
d.serializeOp(*this);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user