#include <Thyra_ParameterDrivenMultiVectorInput.hpp>
Inheritance diagram for Thyra::ParameterDrivenMultiVectorInput< Scalar >:

Constructors/Initializers | |
| ParameterDrivenMultiVectorInput () | |
| | |
| STANDARD_CONST_COMPOSITION_MEMBERS (VectorSpaceBase< Scalar >, vecSpc) | |
| Set the vector space used to create the (multi)vectors that are read in. | |
| STANDARD_COMPOSITION_MEMBERS (MultiVectorFileIOBase< Scalar >, fileIO) | |
| Set the MultiVectorFileIOBase object that will be used to read the vector from file(s). | |
Overridden from ParameterListAcceptor | |
| void | setParameterList (Teuchos::RCP< Teuchos::ParameterList > const ¶mList) |
| | |
| Teuchos::RCP< Teuchos::ParameterList > | getNonconstParameterList () |
| | |
| Teuchos::RCP< Teuchos::ParameterList > | unsetParameterList () |
| | |
| Teuchos::RCP< const Teuchos::ParameterList > | getParameterList () const |
| | |
| Teuchos::RCP< const Teuchos::ParameterList > | getValidParameters () const |
| | |
Informational | |
| const std::string & | readinFileNameBase () const |
Return the value of the parameter "File Name Base" that was read in from the setParameterList() function. | |
| const Teuchos::Array< Scalar > & | readinExplicitArray () const |
Return the value of the parameter "Explicit Array" that was read in from the setParameterList() function. | |
| Scalar | readinScaleBy () const |
Return the value of the parameter "Explicit Array" that was read in from the setParameterList() function. | |
(Multi)Vector Readers | |
| bool | readMultiVector (const std::string &mvName, Thyra::MultiVectorBase< Scalar > *mv) const |
| Read a MultiVector that has already been allocated, as directed by the set parameter sublist. | |
| bool | readVector (const std::string &vName, Teuchos::RCP< Thyra::VectorBase< Scalar > > *v) const |
| Read a Vector as directed by the set parameter sublist, allocating the Vector object if it has not already been allocated. | |
| Teuchos::RCP< Thyra::VectorBase< Scalar > > | readVector (const std::string &vName) const |
| Read a newly allocated Vector as directed by the set parameter sublist. | |
Related Functions | |
| (Note that these are not member functions.) | |
| RCP< const VectorBase< Scalar > > | readVectorOverride (const ParameterDrivenMultiVectorInput< Scalar > &pdmvi, const std::string &vName, const RCP< const VectorBase< Scalar > > &defaultVector) |
| Read a vector and override if one is read. | |
This class is made one-hundred percent general for all ANAs by accepting an abstract MultiVectorFileIOBase object that actually reads the (multi)vectors from file(s) (or whatever implementation is used for the storage of the (multi)vectors).
This class can also read in small (multi)vectors directly from the parameter sublist (see getValidParameters()).
Note that in order to use objects of this type, the client must minimally set the vector space using set_vecSpc() before any vectors can be extracted and if file IO is performed, then a MultiVectorFileIOBase object must be set using set_fileIO(). Note that the parameter sublist can be set using setParameterList() without first setting any of these two objects. In other words, this object can accept a parameter list without knowing anything about the actually type of the (multi)vector that will be read using the readMultiVector() or readVector() functions called later.
This simple utility class is not meant to be too fancy so please just study the actual implementation to see what this class does.
ToDo: When needed, implement a function that can read a multi-vector of any number of columns based on the number of columns stored in the file.
ToDo: When needed, add the ability to read in a multi-vector with more than one column directly from the array parameter.
Definition at line 75 of file Thyra_ParameterDrivenMultiVectorInput.hpp.
| Thyra::ParameterDrivenMultiVectorInput< Scalar >::ParameterDrivenMultiVectorInput | ( | ) |
| Thyra::ParameterDrivenMultiVectorInput< Scalar >::STANDARD_CONST_COMPOSITION_MEMBERS | ( | VectorSpaceBase< Scalar > | , | |
| vecSpc | ||||
| ) |
Set the vector space used to create the (multi)vectors that are read in.
| Thyra::ParameterDrivenMultiVectorInput< Scalar >::STANDARD_COMPOSITION_MEMBERS | ( | MultiVectorFileIOBase< Scalar > | , | |
| fileIO | ||||
| ) |
Set the MultiVectorFileIOBase object that will be used to read the vector from file(s).
| void Thyra::ParameterDrivenMultiVectorInput< Scalar >::setParameterList | ( | Teuchos::RCP< Teuchos::ParameterList > const & | paramList | ) | [virtual] |
Implements Teuchos::ParameterListAcceptor.
Definition at line 359 of file Thyra_ParameterDrivenMultiVectorInput.hpp.
| Teuchos::RCP< Teuchos::ParameterList > Thyra::ParameterDrivenMultiVectorInput< Scalar >::getNonconstParameterList | ( | ) | [virtual] |
Implements Teuchos::ParameterListAcceptor.
Definition at line 382 of file Thyra_ParameterDrivenMultiVectorInput.hpp.
| Teuchos::RCP< Teuchos::ParameterList > Thyra::ParameterDrivenMultiVectorInput< Scalar >::unsetParameterList | ( | ) | [virtual] |
Implements Teuchos::ParameterListAcceptor.
Definition at line 389 of file Thyra_ParameterDrivenMultiVectorInput.hpp.
| Teuchos::RCP< const Teuchos::ParameterList > Thyra::ParameterDrivenMultiVectorInput< Scalar >::getParameterList | ( | ) | const [virtual] |
Reimplemented from Teuchos::ParameterListAcceptor.
Definition at line 399 of file Thyra_ParameterDrivenMultiVectorInput.hpp.
| Teuchos::RCP< const Teuchos::ParameterList > Thyra::ParameterDrivenMultiVectorInput< Scalar >::getValidParameters | ( | ) | const [virtual] |
Reimplemented from Teuchos::ParameterListAcceptor.
Definition at line 406 of file Thyra_ParameterDrivenMultiVectorInput.hpp.
| const std::string & Thyra::ParameterDrivenMultiVectorInput< Scalar >::readinFileNameBase | ( | ) | const [inline] |
Return the value of the parameter "File Name Base" that was read in from the setParameterList() function.
Definition at line 274 of file Thyra_ParameterDrivenMultiVectorInput.hpp.
| const Teuchos::Array< Scalar > & Thyra::ParameterDrivenMultiVectorInput< Scalar >::readinExplicitArray | ( | ) | const [inline] |
Return the value of the parameter "Explicit Array" that was read in from the setParameterList() function.
Definition at line 282 of file Thyra_ParameterDrivenMultiVectorInput.hpp.
| Scalar Thyra::ParameterDrivenMultiVectorInput< Scalar >::readinScaleBy | ( | ) | const [inline] |
Return the value of the parameter "Explicit Array" that was read in from the setParameterList() function.
Definition at line 290 of file Thyra_ParameterDrivenMultiVectorInput.hpp.
| bool Thyra::ParameterDrivenMultiVectorInput< Scalar >::readMultiVector | ( | const std::string & | mvName, | |
| Thyra::MultiVectorBase< Scalar > * | mv | |||
| ) | const |
Read a MultiVector that has already been allocated, as directed by the set parameter sublist.
| mvName | [in] The name of the multi-vector being read. This string name is added to any exception messages that are thrown and is printed to getDefaultOStream() if verbosity is turned on. | |
| mv | [in/out] The multi-vector to be read. |
this->getParameterList().get()!=NULL this->get_vecSpc().get()!=NULL this->readinFileNameBase().length() > 0] this->get_fileIO().get()!=NULL mv!=NULL this->vecSpc().isCompatible(*mv->range())==true
true if a vector was read, false otherwise. Definition at line 443 of file Thyra_ParameterDrivenMultiVectorInput.hpp.
| bool Thyra::ParameterDrivenMultiVectorInput< Scalar >::readVector | ( | const std::string & | vName, | |
| Teuchos::RCP< Thyra::VectorBase< Scalar > > * | v | |||
| ) | const |
Read a Vector as directed by the set parameter sublist, allocating the Vector object if it has not already been allocated.
| vName | [in] The name of the vector being read. This string name is added to any exception messages that are thrown and is printed to getDefaultOStream() if verbosity is turned on. | |
| v | [in/out] RCP to the vector to be read. If v->get()==NULL before this function is called, then a new vector object will be allocated and set on return. On return *(*v) will contain the values read as specified by the parameter sublist. |
this->getParameterList().get()!=NULL this->get_vecSpc().get()!=NULL this->readinFileNameBase().length() > 0] this->get_fileIO().get()!=NULL v!=NULL v->get()!=NULL] this->vecSpc().isCompatible(*(*v)->space())==true Postconditions:
v->get()==NULL on input no vector was read, then v->get()==NULL on output. v->get()==NULL on input a vector was read, then v->get()!=NULL on output.
true if a vector was read, false otherwise.
This function simply calls the above readMultiVector() function but it allocates a Vector object instead of a multi-vector object.
Definition at line 498 of file Thyra_ParameterDrivenMultiVectorInput.hpp.
| Teuchos::RCP< Thyra::VectorBase< Scalar > > Thyra::ParameterDrivenMultiVectorInput< Scalar >::readVector | ( | const std::string & | vName | ) | const |
Read a newly allocated Vector as directed by the set parameter sublist.
This function just calls the above readVector() function (see its preconditions).
returnVal.get()!=NULL if a vector was read and returnVal.get()==NULL if no vector was read. Definition at line 515 of file Thyra_ParameterDrivenMultiVectorInput.hpp.
| RCP< const VectorBase< Scalar > > readVectorOverride | ( | const ParameterDrivenMultiVectorInput< Scalar > & | pdmvi, | |
| const std::string & | vName, | |||
| const RCP< const VectorBase< Scalar > > & | defaultVector | |||
| ) | [related] |
Read a vector and override if one is read.
Definition at line 254 of file Thyra_ParameterDrivenMultiVectorInput.hpp.
1.4.7