MueLu  Version of the Day
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 More...
 
DataBasedatah_
 
bool available_
 is data available? More...
 
KeepType keep_
 keep flag More...
 
int count_
 number of requests by all factories More...
 
request_container requests_
 requesting factories More...
 

Constructors/Destructors.

 VariableContainer ()
 Default constructor. More...
 
 ~VariableContainer ()
 

Data access

template<typename T >
void SetData (const T &entry)
 Store data in container class and set the "Available" status true. More...
 
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. More...
 

Request/Release

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

Keep status

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

Additional Inherited Members

- Public Member Functions inherited from MueLu::BaseClass
virtual ~BaseClass ()
 Destructor. More...
 
- Public Member Functions inherited from MueLu::VerboseObject
VerbLevel GetVerbLevel () const
 Get the verbosity level. More...
 
void SetVerbLevel (const VerbLevel verbLevel)
 Set the verbosity level of this object. More...
 
int GetProcRankVerbose () const
 Get proc rank used for printing. Do not use this information for any other purpose. More...
 
int SetProcRankVerbose (int procRank) const
 Set proc rank used for printing. More...
 
bool IsPrint (MsgType type, int thisProcRankOnly=-1) const
 Find out whether we need to print out information for a specific message type. More...
 
Teuchos::FancyOStream & GetOStream (MsgType type, int thisProcRankOnly=0) const
 Get an output stream for outputting the input message type. More...
 
Teuchos::FancyOStream & GetBlackHole () const
 
 VerboseObject ()
 
virtual ~VerboseObject ()
 Destructor. More...
 
- Public Member Functions inherited from MueLu::Describable
virtual ~Describable ()
 Destructor. More...
 
virtual std::string ShortClassName () const
 Return the class name of the object, without template parameters and without namespace. More...
 
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. More...
 
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. More...
 
- Static Public Member Functions inherited from MueLu::VerboseObject
static void SetDefaultOStream (const Teuchos::RCP< Teuchos::FancyOStream > &defaultOStream)
 
static Teuchos::RCP< Teuchos::FancyOStream > GetDefaultOStream ()
 
static void SetDefaultVerbLevel (const VerbLevel defaultVerbLevel)
 Set the default (global) verbosity level. More...
 
static VerbLevel GetDefaultVerbLevel ()
 Get the default (global) verbosity level. More...
 

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

Definition at line 112 of file MueLu_VariableContainer.hpp.

Constructor & Destructor Documentation

MueLu::VariableContainer::VariableContainer ( )
inline

Default constructor.

Definition at line 130 of file MueLu_VariableContainer.hpp.

MueLu::VariableContainer::~VariableContainer ( )
inline

Definition at line 131 of file MueLu_VariableContainer.hpp.

Member Function Documentation

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 143 of file MueLu_VariableContainer.hpp.

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 154 of file MueLu_VariableContainer.hpp.

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 161 of file MueLu_VariableContainer.hpp.

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

Definition at line 165 of file MueLu_VariableContainer.hpp.

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

Returns true if data is available, i.e.

Definition at line 173 of file MueLu_VariableContainer.hpp.

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

Request data.

Definition at line 181 of file MueLu_VariableContainer.hpp.

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

Release data.

Definition at line 191 of file MueLu_VariableContainer.hpp.

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 201 of file MueLu_VariableContainer.hpp.

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

Returns the number of times the data has been requested.

Definition at line 207 of file MueLu_VariableContainer.hpp.

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

Returns true, if data is requested by reqFactory.

Definition at line 210 of file MueLu_VariableContainer.hpp.

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

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

Definition at line 213 of file MueLu_VariableContainer.hpp.

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

Definition at line 215 of file MueLu_VariableContainer.hpp.

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

Returns true if at least one keep flag is set.

Definition at line 222 of file MueLu_VariableContainer.hpp.

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

Adds a keep flag to the flag combination.

Definition at line 225 of file MueLu_VariableContainer.hpp.

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

Removes a keep flag to the flag combination.

Definition at line 228 of file MueLu_VariableContainer.hpp.

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

Returns the keep flag combination.

Definition at line 231 of file MueLu_VariableContainer.hpp.

Member Data Documentation

DataBase* MueLu::VariableContainer::data_
private

the data itself

Definition at line 115 of file MueLu_VariableContainer.hpp.

DataBase* MueLu::VariableContainer::datah_
mutableprivate

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

Definition at line 117 of file MueLu_VariableContainer.hpp.

bool MueLu::VariableContainer::available_
private

is data available?

Definition at line 119 of file MueLu_VariableContainer.hpp.

KeepType MueLu::VariableContainer::keep_
private

keep flag

Definition at line 120 of file MueLu_VariableContainer.hpp.

int MueLu::VariableContainer::count_
private

number of requests by all factories

Definition at line 121 of file MueLu_VariableContainer.hpp.

request_container MueLu::VariableContainer::requests_
private

requesting factories

Definition at line 123 of file MueLu_VariableContainer.hpp.


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