ParallelWellInfo: optionally instantiate for float

This commit is contained in:
Arne Morten Kvarving 2024-04-12 13:11:09 +02:00
parent d1f08e454a
commit 2ad3679ae4

View File

@ -256,7 +256,7 @@ int CommunicateAboveBelow<Scalar>::endReset()
using FromSet = Dune::EnumItem<Attribute,owner>; using FromSet = Dune::EnumItem<Attribute,owner>;
using ToSet = Dune::AllSet<Attribute>; using ToSet = Dune::AllSet<Attribute>;
interface_.build(remote_indices_, FromSet(), ToSet()); interface_.build(remote_indices_, FromSet(), ToSet());
communicator_.build<double*>(interface_); communicator_.build<Scalar*>(interface_);
} }
#endif #endif
return num_local_perfs_; return num_local_perfs_;
@ -549,9 +549,6 @@ T ParallelWellInfo<Scalar>::broadcastFirstPerforationValue(const T& t) const
return res; return res;
} }
template int ParallelWellInfo<double>::broadcastFirstPerforationValue<int>(const int&) const;
template double ParallelWellInfo<double>::broadcastFirstPerforationValue<double>(const double&) const;
template<class Scalar> template<class Scalar>
std::vector<Scalar> ParallelWellInfo<Scalar>:: std::vector<Scalar> ParallelWellInfo<Scalar>::
communicateAboveValues(Scalar zero_value, communicateAboveValues(Scalar zero_value,
@ -713,26 +710,44 @@ checkAllConnectionsFound()
template<class Scalar> using dIter = typename std::vector<Scalar>::iterator; template<class Scalar> using dIter = typename std::vector<Scalar>::iterator;
template<class Scalar> using cdIter = typename std::vector<Scalar>::const_iterator; template<class Scalar> using cdIter = typename std::vector<Scalar>::const_iterator;
#define INSTANCE(T) \ #define INSTANTIATE_TYPE(T) \
template class CheckDistributedWellConnections<T>; \ template class CheckDistributedWellConnections<T>; \
template class CommunicateAboveBelow<T>; \ template class CommunicateAboveBelow<T>; \
template class GlobalPerfContainerFactory<T>; \ template class GlobalPerfContainerFactory<T>; \
template class ParallelWellInfo<T>; \ template class ParallelWellInfo<T>; \
template typename cdIter<T>::value_type \ template typename cdIter<T>::value_type \
ParallelWellInfo<T>::sumPerfValues<cdIter<T>>(cdIter<T>,cdIter<T>) const; \ ParallelWellInfo<T>::sumPerfValues<cdIter<T>>(cdIter<T>,cdIter<T>) const; \
template typename dIter<T>::value_type \ template typename dIter<T>::value_type \
ParallelWellInfo<T>::sumPerfValues<dIter<T>>(dIter<T>,dIter<T>) const; \ ParallelWellInfo<T>::sumPerfValues<dIter<T>>(dIter<T>,dIter<T>) const; \
template void CommunicateAboveBelow<T>::partialSumPerfValues<dIter<T>>(dIter<T>, dIter<T>) const; \ template int ParallelWellInfo<T>:: \
template bool operator<(const ParallelWellInfo<T>&, const ParallelWellInfo<T>&); \ broadcastFirstPerforationValue<int>(const int&) const; \
template bool operator<(const ParallelWellInfo<T>&, const std::pair<std::string, bool>&); \ template T ParallelWellInfo<T>:: \
template bool operator<(const std::pair<std::string, bool>&, const ParallelWellInfo<T>&); \ broadcastFirstPerforationValue<T>(const T&) const; \
template bool operator==(const ParallelWellInfo<T>&, const ParallelWellInfo<T>&); \ template void CommunicateAboveBelow<T>:: \
template bool operator==(const ParallelWellInfo<T>& well, const std::pair<std::string, bool>&); \ partialSumPerfValues<dIter<T>>(dIter<T>, dIter<T>) const; \
template bool operator==(const std::pair<std::string, bool>&, const ParallelWellInfo<T>&); \ template bool operator<(const ParallelWellInfo<T>&, \
template bool operator!=(const ParallelWellInfo<T>&, const ParallelWellInfo<T>&); \ const ParallelWellInfo<T>&); \
template bool operator!=(const std::pair<std::string, bool>&, const ParallelWellInfo<T>&); \ template bool operator<(const ParallelWellInfo<T>&, \
template bool operator!=(const ParallelWellInfo<T>&, const std::pair<std::string, bool>&); const std::pair<std::string, bool>&); \
template bool operator<(const std::pair<std::string, bool>&, \
const ParallelWellInfo<T>&); \
template bool operator==(const ParallelWellInfo<T>&, \
const ParallelWellInfo<T>&); \
template bool operator==(const ParallelWellInfo<T>& well, \
const std::pair<std::string, bool>&); \
template bool operator==(const std::pair<std::string, bool>&, \
const ParallelWellInfo<T>&); \
template bool operator!=(const ParallelWellInfo<T>&, \
const ParallelWellInfo<T>&); \
template bool operator!=(const std::pair<std::string, bool>&, \
const ParallelWellInfo<T>&); \
template bool operator!=(const ParallelWellInfo<T>&, \
const std::pair<std::string, bool>&);
INSTANCE(double) INSTANTIATE_TYPE(double)
#if FLOW_INSTANTIATE_FLOAT
INSTANTIATE_TYPE(float)
#endif
} // end namespace Opm } // end namespace Opm