MueLu Version of the Day
Loading...
Searching...
No Matches
MueLu::VariableContainer Class Reference

Class that stores all relevant data for a variable. More...

#include <MueLu_VariableContainer.hpp>

Inheritance diagram for MueLu::VariableContainer:
MueLu::BaseClass MueLu::VerboseObject MueLu::Describable

Classes

class  Data
 
class  DataBase
 
struct  Getter
 
struct  Getter< Teuchos::RCP< Xpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > > >
 

Public Types

typedef std::map< const FactoryBase *, int > request_container
 

Private Attributes

DataBasedata_
 the data itself
 
DataBasedatah_
 
bool available_
 is data available?
 
KeepType keep_
 keep flag
 
int count_
 number of requests by all factories
 
request_container requests_
 requesting factories
 

Constructors/Destructors.

 VariableContainer ()
 Default constructor.
 
 ~VariableContainer ()
 

Data access

template<typename T >
void SetData (const T &entry)
 Store data in container class and set the "Available" status true.
 
template<typename T >
const T & GetData () const
 
template<typename T >
T & GetData ()
 
std::string GetTypeName ()
 
bool IsAvailable () const
 Returns true if data is available, i.e.
 

Request/Release

void Request (const FactoryBase *reqFactory)
 Request data.
 
void Release (const FactoryBase *reqFactory)
 Release data.
 
int NumRequests (const FactoryBase *reqFactory) const
 Return the number of times the data has been requested by a specific factory.
 
int NumAllRequests () const
 Returns the number of times the data has been requested.
 
bool IsRequested (const FactoryBase *reqFactory) const
 Returns true, if data is requested by reqFactory.
 
bool IsRequested () const
 Returns true, if data is requested by at least one factory.
 
const request_containerRequests () const
 

Keep status

bool IsKept (KeepType keep) const
 Returns true if at least one keep flag is set.
 
void AddKeepFlag (KeepType keep=UserData)
 Adds a keep flag to the flag combination.
 
void RemoveKeepFlag (KeepType keep=UserData)
 Removes a keep flag to the flag combination.
 
KeepType GetKeepFlag () const
 Returns the keep flag combination.
 

Additional Inherited Members

- Public Member Functions inherited from MueLu::BaseClass
virtual ~BaseClass ()
 Destructor.
 
- Public Member Functions inherited from MueLu::VerboseObject
 VerboseObject ()
 
virtual ~VerboseObject ()
 Destructor.
 
VerbLevel GetVerbLevel () const
 Get the verbosity level.
 
void SetVerbLevel (const VerbLevel verbLevel)
 Set the verbosity level of this object.
 
int GetProcRankVerbose () const
 Get proc rank used for printing. Do not use this information for any other purpose.
 
int SetProcRankVerbose (int procRank) const
 Set proc rank used for printing.
 
bool IsPrint (MsgType type, int thisProcRankOnly=-1) const
 Find out whether we need to print out information for a specific message type.
 
Teuchos::FancyOStream & GetOStream (MsgType type, int thisProcRankOnly=0) const
 Get an output stream for outputting the input message type.
 
Teuchos::FancyOStream & GetBlackHole () const
 
- Public Member Functions inherited from MueLu::Describable
virtual ~Describable ()
 Destructor.
 
virtual void describe (Teuchos::FancyOStream &out_arg, const VerbLevel verbLevel=Default) const
 
virtual std::string description () const
 Return a simple one-line description of this object.
 
void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
 Print the object with some verbosity level to an FancyOStream object.
 
virtual std::string ShortClassName () const
 Return the class name of the object, without template parameters and without namespace.
 
- Static Public Member Functions inherited from MueLu::VerboseObject
static void SetDefaultVerbLevel (const VerbLevel defaultVerbLevel)
 Set the default (global) verbosity level.
 
static VerbLevel GetDefaultVerbLevel ()
 Get the default (global) verbosity level.
 
static void SetMueLuOStream (const Teuchos::RCP< Teuchos::FancyOStream > &mueluOStream)
 
static void SetMueLuOFileStream (const std::string &filename)
 
static Teuchos::RCP< Teuchos::FancyOStream > GetMueLuOStream ()
 

Detailed Description

Class that stores all relevant data for a variable.

Maintains all data for a variable, that is, the data itself, a boolean flag for the "Keep" status, a boolean flag for the "Available" status, a reference counter for all requests and a list with all requesting factories.

Definition at line 73 of file MueLu_VariableContainer.hpp.

Member Typedef Documentation

◆ request_container

Definition at line 120 of file MueLu_VariableContainer.hpp.

Constructor & Destructor Documentation

◆ VariableContainer()

MueLu::VariableContainer::VariableContainer ( )
inline

Default constructor.

Definition at line 138 of file MueLu_VariableContainer.hpp.

◆ ~VariableContainer()

MueLu::VariableContainer::~VariableContainer ( )
inline

Definition at line 139 of file MueLu_VariableContainer.hpp.

Member Function Documentation

◆ SetData()

template<typename T >
void MueLu::VariableContainer::SetData ( const T &  entry)
inline

Store data in container class and set the "Available" status true.

Definition at line 151 of file MueLu_VariableContainer.hpp.

◆ GetData() [1/2]

template<typename T >
const T & MueLu::VariableContainer::GetData ( ) const
inline

Return const reference to data stored in container NOTE: we do not check if data is available

Definition at line 162 of file MueLu_VariableContainer.hpp.

◆ GetData() [2/2]

template<typename T >
T & MueLu::VariableContainer::GetData ( )
inline

Return reference to data stored in container NOTE: we do not check if data is available

Definition at line 169 of file MueLu_VariableContainer.hpp.

◆ GetTypeName()

std::string MueLu::VariableContainer::GetTypeName ( )
inline

Definition at line 173 of file MueLu_VariableContainer.hpp.

◆ IsAvailable()

bool MueLu::VariableContainer::IsAvailable ( ) const
inline

Returns true if data is available, i.e.

Definition at line 181 of file MueLu_VariableContainer.hpp.

◆ Request()

void MueLu::VariableContainer::Request ( const FactoryBase reqFactory)
inline

Request data.

Definition at line 189 of file MueLu_VariableContainer.hpp.

◆ Release()

void MueLu::VariableContainer::Release ( const FactoryBase reqFactory)
inline

Release data.

Definition at line 199 of file MueLu_VariableContainer.hpp.

◆ NumRequests()

int MueLu::VariableContainer::NumRequests ( const FactoryBase reqFactory) const
inline

Return the number of times the data has been requested by a specific factory.

Definition at line 209 of file MueLu_VariableContainer.hpp.

◆ NumAllRequests()

int MueLu::VariableContainer::NumAllRequests ( ) const
inline

Returns the number of times the data has been requested.

Definition at line 215 of file MueLu_VariableContainer.hpp.

◆ IsRequested() [1/2]

bool MueLu::VariableContainer::IsRequested ( const FactoryBase reqFactory) const
inline

Returns true, if data is requested by reqFactory.

Definition at line 218 of file MueLu_VariableContainer.hpp.

◆ IsRequested() [2/2]

bool MueLu::VariableContainer::IsRequested ( ) const
inline

Returns true, if data is requested by at least one factory.

Definition at line 221 of file MueLu_VariableContainer.hpp.

◆ Requests()

const request_container & MueLu::VariableContainer::Requests ( ) const
inline

Definition at line 223 of file MueLu_VariableContainer.hpp.

◆ IsKept()

bool MueLu::VariableContainer::IsKept ( KeepType  keep) const
inline

Returns true if at least one keep flag is set.

Definition at line 230 of file MueLu_VariableContainer.hpp.

◆ AddKeepFlag()

void MueLu::VariableContainer::AddKeepFlag ( KeepType  keep = UserData)
inline

Adds a keep flag to the flag combination.

Definition at line 233 of file MueLu_VariableContainer.hpp.

◆ RemoveKeepFlag()

void MueLu::VariableContainer::RemoveKeepFlag ( KeepType  keep = UserData)
inline

Removes a keep flag to the flag combination.

Definition at line 236 of file MueLu_VariableContainer.hpp.

◆ GetKeepFlag()

KeepType MueLu::VariableContainer::GetKeepFlag ( ) const
inline

Returns the keep flag combination.

Definition at line 239 of file MueLu_VariableContainer.hpp.

Member Data Documentation

◆ data_

DataBase* MueLu::VariableContainer::data_
private

the data itself

Definition at line 123 of file MueLu_VariableContainer.hpp.

◆ datah_

DataBase* MueLu::VariableContainer::datah_
mutableprivate

temporary data storage (need to get a reference to RCP to a base class (like Operator)

Definition at line 125 of file MueLu_VariableContainer.hpp.

◆ available_

bool MueLu::VariableContainer::available_
private

is data available?

Definition at line 127 of file MueLu_VariableContainer.hpp.

◆ keep_

KeepType MueLu::VariableContainer::keep_
private

keep flag

Definition at line 128 of file MueLu_VariableContainer.hpp.

◆ count_

int MueLu::VariableContainer::count_
private

number of requests by all factories

Definition at line 129 of file MueLu_VariableContainer.hpp.

◆ requests_

request_container MueLu::VariableContainer::requests_
private

requesting factories

Definition at line 131 of file MueLu_VariableContainer.hpp.


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