MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 Teuchos::VerboseObject< VerboseObject > Teuchos::Describable Teuchos::VerboseObjectBase Teuchos::LabeledObject

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::FancyOStreamGetOStream (MsgType type, int thisProcRankOnly=0) const
 Get an output stream for outputting the input message type. More...
 
Teuchos::FancyOStreamGetBlackHole () const
 
 VerboseObject ()
 
virtual ~VerboseObject ()
 Destructor. More...
 
- Public Member Functions inherited from Teuchos::VerboseObject< VerboseObject >
 VerboseObject (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null)
 
virtual const VerboseObjectsetVerbLevel (const EVerbosityLevel verbLevel) const
 
virtual const VerboseObjectsetOverridingVerbLevel (const EVerbosityLevel verbLevel) const
 
virtual EVerbosityLevel getVerbLevel () const
 
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
RCP< const ParameterList
getValidVerboseObjectSublist ()
 
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
void 
setupVerboseObjectSublist (ParameterList *paramList)
 
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
void 
readVerboseObjectSublist (ParameterList *paramList, RCP< FancyOStream > *oStream, EVerbosityLevel *verbLevel)
 
void readVerboseObjectSublist (ParameterList *paramList, VerboseObject< ObjectType > *verboseObject)
 
- Public Member Functions inherited from Teuchos::VerboseObjectBase
virtual ~VerboseObjectBase ()
 
 VerboseObjectBase (const RCP< FancyOStream > &oStream=Teuchos::null)
 
virtual const VerboseObjectBasesetOStream (const RCP< FancyOStream > &oStream) const
 
virtual const VerboseObjectBasesetOverridingOStream (const RCP< FancyOStream > &oStream) const
 
virtual VerboseObjectBasesetLinePrefix (const std::string &linePrefix)
 
virtual RCP< FancyOStreamgetOStream () const
 
virtual RCP< FancyOStreamgetOverridingOStream () const
 
virtual std::string getLinePrefix () const
 
virtual OSTab getOSTab (const int tabs=1, const std::string &linePrefix="") const
 
- 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...
 
- Public Member Functions inherited from Teuchos::Describable
void describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 
 LabeledObject ()
 
virtual ~LabeledObject ()
 
virtual void setObjectLabel (const std::string &objectLabel)
 
virtual std::string getObjectLabel () const
 
DescribableStreamManipulatorState describe (const Describable &describable, const EVerbosityLevel verbLevel=Describable::verbLevel_default)
 
std::ostream & operator<< (std::ostream &os, const DescribableStreamManipulatorState &d)
 
- Static Public Member Functions inherited from MueLu::VerboseObject
static void SetMueLuOStream (const Teuchos::RCP< Teuchos::FancyOStream > &mueluOStream)
 
static Teuchos::RCP
< Teuchos::FancyOStream
GetMueLuOStream ()
 
static void SetDefaultVerbLevel (const VerbLevel defaultVerbLevel)
 Set the default (global) verbosity level. More...
 
static VerbLevel GetDefaultVerbLevel ()
 Get the default (global) verbosity level. More...
 
- Static Public Member Functions inherited from Teuchos::VerboseObject< VerboseObject >
static void setDefaultVerbLevel (const EVerbosityLevel defaultVerbLevel)
 
static EVerbosityLevel getDefaultVerbLevel ()
 
- Static Public Member Functions inherited from Teuchos::VerboseObjectBase
static void setDefaultOStream (const RCP< FancyOStream > &defaultOStream)
 
static RCP< FancyOStreamgetDefaultOStream ()
 
- Static Public Attributes inherited from Teuchos::Describable
static const EVerbosityLevel verbLevel_default
 
- Protected Member Functions inherited from Teuchos::VerboseObject< VerboseObject >
void initializeVerboseObject (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null)
 
- Protected Member Functions inherited from Teuchos::VerboseObjectBase
void initializeVerboseObjectBase (const RCP< FancyOStream > &oStream=Teuchos::null)
 
virtual void informUpdatedVerbosityState () const
 

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

Constructor & Destructor Documentation

MueLu::VariableContainer::VariableContainer ( )
inline

Default constructor.

Definition at line 138 of file MueLu_VariableContainer.hpp.

MueLu::VariableContainer::~VariableContainer ( )
inline

Definition at line 139 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 151 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 162 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 169 of file MueLu_VariableContainer.hpp.

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

Definition at line 173 of file MueLu_VariableContainer.hpp.

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

Returns true if data is available, i.e.

Definition at line 181 of file MueLu_VariableContainer.hpp.

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

Request data.

Definition at line 189 of file MueLu_VariableContainer.hpp.

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

Release data.

Definition at line 199 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 209 of file MueLu_VariableContainer.hpp.

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.

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.

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.

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

Definition at line 223 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 230 of file MueLu_VariableContainer.hpp.

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.

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.

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

Returns the keep flag combination.

Definition at line 239 of file MueLu_VariableContainer.hpp.

Member Data Documentation

DataBase* MueLu::VariableContainer::data_
private

the data itself

Definition at line 123 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 125 of file MueLu_VariableContainer.hpp.

bool MueLu::VariableContainer::available_
private

is data available?

Definition at line 127 of file MueLu_VariableContainer.hpp.

KeepType MueLu::VariableContainer::keep_
private

keep flag

Definition at line 128 of file MueLu_VariableContainer.hpp.

int MueLu::VariableContainer::count_
private

number of requests by all factories

Definition at line 129 of file MueLu_VariableContainer.hpp.

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: