Public Types | Public Member Functions | Private Member Functions | Private Attributes

Albany::StateManager Class Reference

Class to manage saved state data. More...

#include <Albany_StateManager.hpp>

List of all members.

Public Types

enum  SAType { ELEM, NODE }
typedef std::map< std::string,
Teuchos::RCP< PHX::DataLayout > > 
RegisteredStates

Public Member Functions

 StateManager ()
 ~StateManager ()
void registerStateVariable (const std::string &stateName, const Teuchos::RCP< PHX::DataLayout > &dl, const std::string &ebName, const std::string &init_type="scalar", const double init_val=0.0, const bool registerOldState=false, const bool outputToExodus=true, const std::string &responseIDtoRequire="")
 Method to call multiple times (before allocate) to register which states will be saved.
Teuchos::RCP
< Teuchos::ParameterList > 
registerStateVariable (const std::string &name, const Teuchos::RCP< PHX::DataLayout > &dl, const Teuchos::RCP< PHX::DataLayout > &dummy, const std::string &ebName, const std::string &init_type="scalar", const double init_val=0.0, const bool registerOldState=false)
 Method to call multiple times (before allocate) to register which states will be saved.
Teuchos::RCP
< Teuchos::ParameterList > 
registerStateVariable (const std::string &stateName, const Teuchos::RCP< PHX::DataLayout > &dl, const Teuchos::RCP< PHX::DataLayout > &dummy, const std::string &ebName, const std::string &init_type, const double init_val, const bool registerOldState, const std::string &fieldName)
 If field name to save/load is different from state name.
Teuchos::RCP
< Teuchos::ParameterList > 
registerStateVariable (const std::string &stateName, const Teuchos::RCP< PHX::DataLayout > &dl, const Teuchos::RCP< PHX::DataLayout > &dummy, const std::string &ebName, const std::string &init_type, const double init_val, const bool registerOldState, const bool outputToExodus)
 If you want to give more control over whether or not to output to Exodus.
void registerStateVariable (const std::string &stateName, const Teuchos::RCP< PHX::DataLayout > &dl, const std::string &init_type)
 Very basic.
void importStateData (Albany::StateArrays &statesToCopyFrom)
 Method to re-initialize state variables, which can be called multiple times after allocating.
std::map< std::string,
RegisteredStates > & 
getRegisteredStates ()
 Method to get the Names of the state variables.
std::vector< std::string > getResidResponseIDsToRequire (std::string &elementBlockName)
 Method to get the ResponseIDs for states which have been registered and (should) have a SaveStateField evaluator associated with them that evaluates the responseID.
void updateStates ()
 Method to make the current newState the oldState, and vice versa.
Teuchos::RCP
< Albany::StateInfoStruct
getStateInfoStruct ()
 Method to get a StateInfoStruct of info needed by STK to output States as Fields.
void setStateArrays (const Teuchos::RCP< Albany::AbstractDiscretization > &discObj)
 Method to set discretization object.
Teuchos::RCP
< Albany::AbstractDiscretization
getDiscretization ()
 Method to get discretization object.
Albany::StateArraygetStateArray (SAType type, int ws) const
 Method to get state information for a specific workset.
Albany::StateArraysgetStateArrays () const
 Method to get state information for all worksets.
Teuchos::RCP
< Adapt::NodalDataBlock
getNodalDataBlock ()
Teuchos::RCP
< Albany::EigendataStruct
getEigenData ()
 Methods to get/set the EigendataStruct which holds eigenvalue / eigenvector data.
void setEigenData (const Teuchos::RCP< Albany::EigendataStruct > &eigdata)
Teuchos::RCP< Epetra_MultiVector > getAuxData ()
 Methods to get/set Auxilliary data vectors.
void setAuxData (const Teuchos::RCP< Epetra_MultiVector > &aux_data)

Private Member Functions

 StateManager (const StateManager &)
 Private to prohibit copying.
StateManageroperator= (const StateManager &)
 Private to prohibit copying.

Private Attributes

bool stateVarsAreAllocated
 boolean to enforce that allocate gets called once, and after registration and befor gets
std::map< std::string,
RegisteredStates
statesToStore
 Container to hold the states that have been registered, by element block, to be allocated later.
Teuchos::RCP
< Albany::AbstractDiscretization
disc
 Discretization object which allows StateManager to perform input/output with exodus and Epetra vectors.
Teuchos::RCP< StateInfoStructstateInfo
 NEW WAY.
Teuchos::RCP< EigendataStructeigenData
Teuchos::RCP< Epetra_MultiVector > auxData
double time
double timeOld

Detailed Description

Class to manage saved state data.

Definition at line 34 of file Albany_StateManager.hpp.


Member Typedef Documentation

typedef std::map<std::string, Teuchos::RCP<PHX::DataLayout> > Albany::StateManager::RegisteredStates

Definition at line 41 of file Albany_StateManager.hpp.


Member Enumeration Documentation

Enumerator:
ELEM 
NODE 

Definition at line 37 of file Albany_StateManager.hpp.


Constructor & Destructor Documentation

Albany::StateManager::StateManager (  ) 

Definition at line 12 of file Albany_StateManager.cpp.

Albany::StateManager::~StateManager (  )  [inline]

Definition at line 41 of file Albany_StateManager.hpp.

Albany::StateManager::StateManager ( const StateManager  )  [private]

Private to prohibit copying.


Member Function Documentation

void Albany::StateManager::registerStateVariable ( const std::string &  stateName,
const Teuchos::RCP< PHX::DataLayout > &  dl,
const std::string &  ebName,
const std::string &  init_type = "scalar",
const double  init_val = 0.0,
const bool  registerOldState = false,
const bool  outputToExodus = true,
const std::string &  responseIDtoRequire = "" 
)

Method to call multiple times (before allocate) to register which states will be saved.

Definition at line 91 of file Albany_StateManager.cpp.

Teuchos::RCP< Teuchos::ParameterList > Albany::StateManager::registerStateVariable ( const std::string &  name,
const Teuchos::RCP< PHX::DataLayout > &  dl,
const Teuchos::RCP< PHX::DataLayout > &  dummy,
const std::string &  ebName,
const std::string &  init_type = "scalar",
const double  init_val = 0.0,
const bool  registerOldState = false 
)

Method to call multiple times (before allocate) to register which states will be saved.

Returns param vector with all info to build a SaveStateField or LoadStateField evaluator

Definition at line 21 of file Albany_StateManager.cpp.

Teuchos::RCP< Teuchos::ParameterList > Albany::StateManager::registerStateVariable ( const std::string &  stateName,
const Teuchos::RCP< PHX::DataLayout > &  dl,
const Teuchos::RCP< PHX::DataLayout > &  dummy,
const std::string &  ebName,
const std::string &  init_type,
const double  init_val,
const bool  registerOldState,
const std::string &  fieldName 
)

If field name to save/load is different from state name.

Definition at line 32 of file Albany_StateManager.cpp.

Teuchos::RCP< Teuchos::ParameterList > Albany::StateManager::registerStateVariable ( const std::string &  stateName,
const Teuchos::RCP< PHX::DataLayout > &  dl,
const Teuchos::RCP< PHX::DataLayout > &  dummy,
const std::string &  ebName,
const std::string &  init_type,
const double  init_val,
const bool  registerOldState,
const bool  outputToExodus 
)

If you want to give more control over whether or not to output to Exodus.

Definition at line 54 of file Albany_StateManager.cpp.

void Albany::StateManager::registerStateVariable ( const std::string &  stateName,
const Teuchos::RCP< PHX::DataLayout > &  dl,
const std::string &  init_type 
)

Very basic.

Definition at line 75 of file Albany_StateManager.cpp.

void Albany::StateManager::importStateData ( Albany::StateArrays statesToCopyFrom  ) 

Method to re-initialize state variables, which can be called multiple times after allocating.

Definition at line 412 of file Albany_StateManager.cpp.

std::map<std::string, RegisteredStates>& Albany::StateManager::getRegisteredStates (  )  [inline]

Method to get the Names of the state variables.

Definition at line 95 of file Albany_StateManager.hpp.

std::vector< std::string > Albany::StateManager::getResidResponseIDsToRequire ( std::string &  elementBlockName  ) 

Method to get the ResponseIDs for states which have been registered and (should) have a SaveStateField evaluator associated with them that evaluates the responseID.

Definition at line 622 of file Albany_StateManager.cpp.

void Albany::StateManager::updateStates (  ) 

Method to make the current newState the oldState, and vice versa.

Definition at line 552 of file Albany_StateManager.cpp.

Teuchos::RCP< Albany::StateInfoStruct > Albany::StateManager::getStateInfoStruct (  ) 

Method to get a StateInfoStruct of info needed by STK to output States as Fields.

Definition at line 201 of file Albany_StateManager.cpp.

void Albany::StateManager::setStateArrays ( const Teuchos::RCP< Albany::AbstractDiscretization > &  discObj  ) 

Method to set discretization object.

Definition at line 207 of file Albany_StateManager.cpp.

Teuchos::RCP< Albany::AbstractDiscretization > Albany::StateManager::getDiscretization (  ) 

Method to get discretization object.

Definition at line 404 of file Albany_StateManager.cpp.

Albany::StateArray & Albany::StateManager::getStateArray ( SAType  type,
int  ws 
) const

Method to get state information for a specific workset.

Definition at line 527 of file Albany_StateManager.cpp.

Albany::StateArrays & Albany::StateManager::getStateArrays (  )  const

Method to get state information for all worksets.

Definition at line 545 of file Albany_StateManager.cpp.

Teuchos::RCP<Adapt::NodalDataBlock> Albany::StateManager::getNodalDataBlock (  )  [inline]

Definition at line 118 of file Albany_StateManager.hpp.

Teuchos::RCP< Albany::EigendataStruct > Albany::StateManager::getEigenData (  ) 

Methods to get/set the EigendataStruct which holds eigenvalue / eigenvector data.

Definition at line 596 of file Albany_StateManager.cpp.

void Albany::StateManager::setEigenData ( const Teuchos::RCP< Albany::EigendataStruct > &  eigdata  ) 

Definition at line 602 of file Albany_StateManager.cpp.

Teuchos::RCP< Epetra_MultiVector > Albany::StateManager::getAuxData (  ) 

Methods to get/set Auxilliary data vectors.

Definition at line 609 of file Albany_StateManager.cpp.

void Albany::StateManager::setAuxData ( const Teuchos::RCP< Epetra_MultiVector > &  aux_data  ) 

Definition at line 615 of file Albany_StateManager.cpp.

StateManager& Albany::StateManager::operator= ( const StateManager  )  [private]

Private to prohibit copying.


Member Data Documentation

boolean to enforce that allocate gets called once, and after registration and befor gets

Definition at line 139 of file Albany_StateManager.hpp.

std::map<std::string, RegisteredStates> Albany::StateManager::statesToStore [private]

Container to hold the states that have been registered, by element block, to be allocated later.

Definition at line 142 of file Albany_StateManager.hpp.

Discretization object which allows StateManager to perform input/output with exodus and Epetra vectors.

Definition at line 145 of file Albany_StateManager.hpp.

NEW WAY.

Definition at line 148 of file Albany_StateManager.hpp.

Definition at line 149 of file Albany_StateManager.hpp.

Teuchos::RCP<Epetra_MultiVector> Albany::StateManager::auxData [private]

Definition at line 150 of file Albany_StateManager.hpp.

double Albany::StateManager::time [private]

Definition at line 153 of file Albany_StateManager.hpp.

Definition at line 154 of file Albany_StateManager.hpp.


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