Opm::ParallelFieldPropsManager Class Reference

Parallel frontend to the field properties. More...

#include <ParallelEclipseState.hpp>

Inheritance diagram for Opm::ParallelFieldPropsManager:
Inheritance graph

Public Member Functions

 ParallelFieldPropsManager (FieldPropsManager &manager)
 Constructor. More...
 
 ParallelFieldPropsManager (FieldPropsManager &manager, Parallel::Communication comm)
 Constructor. More...
 
std::vector< int > actnum () const override
 Returns actnum vector. More...
 
void reset_actnum (const std::vector< int > &actnum) override
 Reset the actnum vector. More...
 
std::vector< double > porv (bool global=false) const override
 Returns the pore volume vector. More...
 
const std::vector< int > & get_int (const std::string &keyword) const override
 Returns an int property using compressed indices. More...
 
const std::vector< double > & get_double (const std::string &keyword) const override
 Returns a double property using compressed indices. More...
 
std::vector< int > get_global_int (const std::string &keyword) const override
 Returns an int property using global cartesian indices. More...
 
std::vector< double > get_global_double (const std::string &keyword) const override
 Returns a double property using global cartesian indices. More...
 
bool has_int (const std::string &keyword) const override
 Check if an integer property is available. More...
 
bool has_double (const std::string &keyword) const override
 Check if a double property is available. More...
 
std::vector< std::string > fip_regions () const override
 Returns a list of registered FIP regions. More...
 
template<class T >
void resetCartesianMapper (const T *mapper)
 Resets the underlying cartesian mapper \detail This has to be the cartesian mapper of the distributed grid. It will be used to autocreate properties not explicitly stored. More...
 
bool tran_active (const std::string &keyword) const override
 
void apply_tran (const std::string &keyword, std::vector< double > &trans) const override
 
void copyTran (const FieldPropsManager &from)
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 

Protected Attributes

std::map< std::string, Fieldprops::FieldData< int > > m_intProps
 Map of integer properties in process-local compressed indices. More...
 
std::map< std::string, Fieldprops::FieldData< double > > m_doubleProps
 Map of double properties in process-local compressed indices. More...
 
FieldPropsManager & m_manager
 Underlying field property manager (only used on root process). More...
 
Parallel::Communication m_comm
 Collective communication handler. More...
 
std::function< int(void)> m_activeSize
 active size function of the grid More...
 
std::function< int(const int)> m_local2Global
 mapping from local to global cartesian indices More...
 
std::unordered_map< std::string, Fieldprops::TranCalculator > m_tran
 calculators map More...
 

Friends

class ParallelEclipseState
 
template<class Grid >
class PropsDataHandle
 Friend to set up props. More...
 

Detailed Description

Parallel frontend to the field properties.

This is a parallel frontend to the mpi-unaware FieldPropsManager in opm-common. It contains process-local field properties on each process using compressed indexing.

Constructor & Destructor Documentation

◆ ParallelFieldPropsManager() [1/2]

Opm::ParallelFieldPropsManager::ParallelFieldPropsManager ( FieldPropsManager &  manager)

Constructor.

Parameters
managerThe field property manager to wrap.

◆ ParallelFieldPropsManager() [2/2]

Opm::ParallelFieldPropsManager::ParallelFieldPropsManager ( FieldPropsManager &  manager,
Parallel::Communication  comm 
)

Constructor.

Parameters
managerThe field property manager to wrap.

Member Function Documentation

◆ actnum()

std::vector< int > Opm::ParallelFieldPropsManager::actnum ( ) const
override

Returns actnum vector.

If called on non-root process an empty vector is returned

◆ apply_tran()

void Opm::ParallelFieldPropsManager::apply_tran ( const std::string &  keyword,
std::vector< double > &  trans 
) const
override

◆ copyTran()

void Opm::ParallelFieldPropsManager::copyTran ( const FieldPropsManager &  from)
inline

◆ fip_regions()

std::vector< std::string > Opm::ParallelFieldPropsManager::fip_regions ( ) const
override

Returns a list of registered FIP regions.

◆ get_double()

const std::vector< double > & Opm::ParallelFieldPropsManager::get_double ( const std::string &  keyword) const
override

Returns a double property using compressed indices.

Parameters
keywordName of property

◆ get_global_double()

std::vector< double > Opm::ParallelFieldPropsManager::get_global_double ( const std::string &  keyword) const
override

Returns a double property using global cartesian indices.

Parameters
keywordName of property

The vector is broadcast from root process

◆ get_global_int()

std::vector< int > Opm::ParallelFieldPropsManager::get_global_int ( const std::string &  keyword) const
override

Returns an int property using global cartesian indices.

Parameters
keywordName of property

The vector is broadcast from root process

◆ get_int()

const std::vector< int > & Opm::ParallelFieldPropsManager::get_int ( const std::string &  keyword) const
override

Returns an int property using compressed indices.

Parameters
keywordName of property

◆ has_double()

bool Opm::ParallelFieldPropsManager::has_double ( const std::string &  keyword) const
override

Check if a double property is available.

Parameters
keywordName of property

◆ has_int()

bool Opm::ParallelFieldPropsManager::has_int ( const std::string &  keyword) const
override

Check if an integer property is available.

Parameters
keywordName of property

◆ porv()

std::vector< double > Opm::ParallelFieldPropsManager::porv ( bool  global = false) const
override

Returns the pore volume vector.

◆ reset_actnum()

void Opm::ParallelFieldPropsManager::reset_actnum ( const std::vector< int > &  actnum)
override

Reset the actnum vector.

Can only be called on root process

◆ resetCartesianMapper()

template<class T >
void Opm::ParallelFieldPropsManager::resetCartesianMapper ( const T *  mapper)
inline

Resets the underlying cartesian mapper \detail This has to be the cartesian mapper of the distributed grid. It will be used to autocreate properties not explicitly stored.

Template Parameters
TThe type of the cartesian mapper
Parameters
mapperThe cartesian mapper of the distributed grid

References m_activeSize, and m_local2Global.

Referenced by Opm::ParallelEclipseState::resetCartesianMapper().

◆ serializeOp()

template<class Serializer >
void Opm::ParallelFieldPropsManager::serializeOp ( Serializer &  serializer)
inline

◆ tran_active()

bool Opm::ParallelFieldPropsManager::tran_active ( const std::string &  keyword) const
override

Friends And Related Function Documentation

◆ ParallelEclipseState

friend class ParallelEclipseState
friend

Friend so props can be setup.

◆ PropsDataHandle

template<class Grid >
friend class PropsDataHandle
friend

Friend to set up props.

Member Data Documentation

◆ m_activeSize

std::function<int(void)> Opm::ParallelFieldPropsManager::m_activeSize
protected

active size function of the grid

Referenced by resetCartesianMapper().

◆ m_comm

Parallel::Communication Opm::ParallelFieldPropsManager::m_comm
protected

Collective communication handler.

◆ m_doubleProps

std::map<std::string, Fieldprops::FieldData<double> > Opm::ParallelFieldPropsManager::m_doubleProps
protected

Map of double properties in process-local compressed indices.

Referenced by Opm::PropsDataHandle< Grid >::~PropsDataHandle().

◆ m_intProps

std::map<std::string, Fieldprops::FieldData<int> > Opm::ParallelFieldPropsManager::m_intProps
protected

Map of integer properties in process-local compressed indices.

Referenced by Opm::PropsDataHandle< Grid >::~PropsDataHandle().

◆ m_local2Global

std::function<int(const int)> Opm::ParallelFieldPropsManager::m_local2Global
protected

mapping from local to global cartesian indices

Referenced by resetCartesianMapper().

◆ m_manager

FieldPropsManager& Opm::ParallelFieldPropsManager::m_manager
protected

Underlying field property manager (only used on root process).

◆ m_tran

std::unordered_map<std::string, Fieldprops::TranCalculator> Opm::ParallelFieldPropsManager::m_tran
protected

calculators map

Referenced by copyTran(), and serializeOp().


The documentation for this class was generated from the following file: