Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node > Class Template Reference

1D CGFEM model for convection/diffusion/reaction More...

#include <CDR_Model_Tpetra_decl.hpp>

Inheritance diagram for Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >:
Thyra::StateFuncModelEvaluatorBase< SC > Thyra::ModelEvaluatorDefaultBase< Scalar > Thyra::ModelEvaluator< class > Thyra::ModelEvaluatorBase Teuchos::Describable Teuchos::LabeledObject

Public Types

using tpetra_map = Tpetra::Map< LO, GO, Node >
 
using tpetra_graph = Tpetra::CrsGraph< LO, GO, Node >
 
using tpetra_matrix = Tpetra::CrsMatrix< SC, LO, GO, Node >
 
using tpetra_vec = Tpetra::Vector< SC, LO, GO, Node >
 
using tpetra_extract = ::Thyra::TpetraOperatorVectorExtraction< SC, LO, GO, Node >
 
- Public Types inherited from Thyra::ModelEvaluator< class >
enum  EInArgsMembers
 
enum  EInArgs_p_mp
 
enum  EEvalType
 
enum  EDerivativeMultiVectorOrientation
 
enum  EDerivativeLinearOp
 
enum  EDerivativeLinearity
 
enum  ERankStatus
 
enum  EOutArgsMembers
 
enum  EOutArgsDfDp
 
enum  EOutArgsDgDx_dot
 
enum  EOutArgsDgDx
 
enum  EOutArgsDgDp
 
enum  EOutArgsDfDp_mp
 
enum  EOutArgs_g_mp
 
enum  EOutArgsDgDx_dot_mp
 
enum  EOutArgsDgDx_mp
 
enum  EOutArgsDgDp_mp
 
typedef Teuchos::ScalarTraits
< Scalar >::magnitudeType 
ScalarMag
 

Public Member Functions

 CDR_Model_Tpetra (const Teuchos::RCP< const Teuchos::Comm< int >> &comm, const GO numGlobalElements, const SC zMin, const SC zMax, const SC a, const SC k)
 
- Public Member Functions inherited from Thyra::StateFuncModelEvaluatorBase< SC >
RCP< const VectorSpaceBase
< Scalar > > 
get_p_space (int l) const
 
RCP< const Teuchos::Array
< std::string > > 
get_p_names (int l) const
 
RCP< const VectorSpaceBase
< Scalar > > 
get_g_space (int j) const
 
Teuchos::ArrayView< const
std::string > 
get_g_names (int j) const
 
ModelEvaluatorBase::InArgs
< Scalar > 
getNominalValues () const
 
ModelEvaluatorBase::InArgs
< Scalar > 
getLowerBounds () const
 
ModelEvaluatorBase::InArgs
< Scalar > 
getUpperBounds () const
 
RCP< LinearOpBase< Scalar > > create_W_op () const
 
RCP< PreconditionerBase< Scalar > > create_W_prec () const
 
RCP< const
LinearOpWithSolveFactoryBase
< Scalar > > 
get_W_factory () const
 
void reportFinalPoint (const ModelEvaluatorBase::InArgs< Scalar > &finalPoint, const bool wasSolved)
 
- Public Member Functions inherited from Thyra::ModelEvaluator< class >
virtual int Np () const =0
 
virtual int Ng () const =0
 
virtual RCP< const
VectorSpaceBase< Scalar > > 
get_f_multiplier_space () const =0
 
virtual RCP< const
VectorSpaceBase< Scalar > > 
get_g_multiplier_space (int j) const =0
 
virtual RCP< LinearOpBase
< Scalar > > 
create_DfDp_op (int l) const =0
 
virtual RCP< LinearOpBase
< Scalar > > 
create_DgDx_dot_op (int j) const =0
 
virtual RCP< LinearOpBase
< Scalar > > 
create_DgDx_op (int j) const =0
 
virtual RCP< LinearOpBase
< Scalar > > 
create_DgDp_op (int j, int l) const =0
 
virtual
ModelEvaluatorBase::OutArgs
< Scalar > 
createOutArgs () const =0
 
virtual void evalModel (const ModelEvaluatorBase::InArgs< Scalar > &inArgs, const ModelEvaluatorBase::OutArgs< Scalar > &outArgs) const =0
 
 ModelEvaluatorBase ()
 
std::string toString (ModelEvaluatorBase::EInArgsMembers)
 
std::string toString (ModelEvaluatorBase::EOutArgsMembers)
 
std::string toString (ModelEvaluatorBase::EDerivativeMultiVectorOrientation orientation)
 
ModelEvaluatorBase::EDerivativeMultiVectorOrientation getOtherDerivativeMultiVectorOrientation (ModelEvaluatorBase::EDerivativeMultiVectorOrientation orientation)
 
- Public Member Functions inherited from Teuchos::Describable
virtual std::string description () const
 
virtual void describe (FancyOStream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 
void describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 
virtual ~Describable ()
 
 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)
 

Private Member Functions

virtual Teuchos::RCP< const
Tpetra::CrsGraph< LO, GO, Node > > 
createGraph ()
 

Private Attributes

const Teuchos::RCP< const
Teuchos::Comm< int > > 
comm_
 
const int numGlobalElements_
 
const SC zMin_
 
const SC zMax_
 
const SC a_
 
const SC k_
 
Teuchos::RCP< const
::Thyra::VectorSpaceBase< SC > > 
xSpace_
 
Teuchos::RCP< const tpetra_mapxOwnedMap_
 
Teuchos::RCP< const tpetra_mapxGhostedMap_
 
Teuchos::RCP< const
Tpetra::Import< LO, GO, Node > > 
importer_
 
Teuchos::RCP< const
::Thyra::VectorSpaceBase< SC > > 
fSpace_
 
Teuchos::RCP< const tpetra_mapfOwnedMap_
 
Teuchos::RCP< const tpetra_graphwGraph_
 
Teuchos::RCP< const
::Thyra::LinearOpWithSolveFactoryBase
< SC > > 
wFactory_
 
Teuchos::RCP< tpetra_vecnodeCoordinates_
 
Teuchos::RCP< tpetra_vecGhostedNodeCoordinates_
 
Teuchos::RCP< tpetra_vecuPtr_
 
Teuchos::RCP< tpetra_vecuDotPtr_
 
Teuchos::RCP< tpetra_vecxPtr_
 
Teuchos::RCP< tpetra_vecjDiag_
 
::Thyra::ModelEvaluatorBase::InArgs
< SC > 
nominalValues_
 
Teuchos::RCP
<::Thyra::VectorBase< SC > > 
x0_
 
Teuchos::Array< SC > p_
 
bool showGetInvalidArg_
 
::Thyra::ModelEvaluatorBase::InArgs
< SC > 
prototypeInArgs_
 
::Thyra::ModelEvaluatorBase::OutArgs
< SC > 
prototypeOutArgs_
 

Initializers/Accessors

void set_x0 (const Teuchos::ArrayView< const SC > &x0)
 
void setShowGetInvalidArgs (bool showGetInvalidArg)
 
void set_W_factory (const Teuchos::RCP< const ::Thyra::LinearOpWithSolveFactoryBase< SC >> &W_factory)
 

Public functions overridden from ModelEvaluator.

Teuchos::RCP< const
::Thyra::VectorSpaceBase< SC > > 
get_x_space () const
 
Teuchos::RCP< const
::Thyra::VectorSpaceBase< SC > > 
get_f_space () const
 
::Thyra::ModelEvaluatorBase::InArgs
< SC > 
getNominalValues () const
 
Teuchos::RCP
< Thyra::LinearOpWithSolveBase
< double > > 
create_W () const
 
Teuchos::RCP
<::Thyra::LinearOpBase< SC > > 
create_W_op () const
 
Teuchos::RCP< const
::Thyra::LinearOpWithSolveFactoryBase
< SC > > 
get_W_factory () const
 
::Thyra::ModelEvaluatorBase::InArgs
< SC > 
createInArgs () const
 
Teuchos::RCP
<::Thyra::PreconditionerBase
< SC > > 
create_W_prec () const
 

Private functions overridden from ModelEvaluatorDefaultBase.

::Thyra::ModelEvaluatorBase::OutArgs
< SC > 
createOutArgsImpl () const
 
void evalModelImpl (const ::Thyra::ModelEvaluatorBase::InArgs< SC > &inArgs, const ::Thyra::ModelEvaluatorBase::OutArgs< SC > &outArgs) const
 

Additional Inherited Members

- Static Public Attributes inherited from Thyra::ModelEvaluator< class >
static const int NUM_E_IN_ARGS_MEMBERS
 
static const int NUM_E_OUT_ARGS_MEMBERS
 
- Static Public Attributes inherited from Teuchos::Describable
static const EVerbosityLevel verbLevel_default
 

Detailed Description

template<typename SC, typename LO, typename GO, typename Node>
class Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >

1D CGFEM model for convection/diffusion/reaction

The equation modeled is:

dT     dT   d^2(T)
-- + a -- + ------ - K * T**2 = 0
dt     dz    dz^2

   subject to:
      T = 1.0 @ z = z_min

The Matrix W = d(f)/d(x) is implemented as a Thyra::MultiVectorBase object and the class Thyra::DefaultSerialDenseLinearOpWithSolveFactory is used to create the linear solver.

Definition at line 44 of file CDR_Model_Tpetra_decl.hpp.

Member Typedef Documentation

template<typename SC , typename LO , typename GO , typename Node >
using Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::tpetra_map = Tpetra::Map<LO, GO, Node>

Definition at line 46 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
using Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::tpetra_graph = Tpetra::CrsGraph<LO, GO, Node>

Definition at line 47 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
using Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::tpetra_matrix = Tpetra::CrsMatrix<SC, LO, GO, Node>

Definition at line 48 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
using Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::tpetra_vec = Tpetra::Vector<SC, LO, GO, Node>

Definition at line 49 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
using Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::tpetra_extract = ::Thyra::TpetraOperatorVectorExtraction<SC, LO, GO, Node>

Definition at line 51 of file CDR_Model_Tpetra_decl.hpp.

Constructor & Destructor Documentation

template<typename SC , typename LO , typename GO , typename Node >
Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::CDR_Model_Tpetra ( const Teuchos::RCP< const Teuchos::Comm< int >> &  comm,
const GO  numGlobalElements,
const SC  zMin,
const SC  zMax,
const SC  a,
const SC  k 
)

Definition at line 42 of file CDR_Model_Tpetra_impl.hpp.

Member Function Documentation

template<typename SC , typename LO , typename GO , typename Node >
void Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::set_x0 ( const Teuchos::ArrayView< const SC > &  x0)

Definition at line 190 of file CDR_Model_Tpetra_impl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
void Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::setShowGetInvalidArgs ( bool  showGetInvalidArg)

Definition at line 201 of file CDR_Model_Tpetra_impl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
void Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::set_W_factory ( const Teuchos::RCP< const ::Thyra::LinearOpWithSolveFactoryBase< SC >> &  W_factory)

Definition at line 208 of file CDR_Model_Tpetra_impl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Teuchos::RCP< const Thyra::VectorSpaceBase< SC > > Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::get_x_space ( ) const
virtual

Implements Thyra::ModelEvaluator< class >.

Definition at line 219 of file CDR_Model_Tpetra_impl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Teuchos::RCP< const Thyra::VectorSpaceBase< SC > > Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::get_f_space ( ) const
virtual

Implements Thyra::ModelEvaluator< class >.

Definition at line 226 of file CDR_Model_Tpetra_impl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Thyra::ModelEvaluatorBase::InArgs< SC > Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::getNominalValues ( ) const
virtual

Implements Thyra::ModelEvaluator< class >.

Definition at line 233 of file CDR_Model_Tpetra_impl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Teuchos::RCP< Thyra::LinearOpWithSolveBase< double > > Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::create_W ( ) const
virtual

Implements Thyra::ModelEvaluator< class >.

Definition at line 240 of file CDR_Model_Tpetra_impl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Teuchos::RCP< Thyra::LinearOpBase< SC > > Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::create_W_op ( ) const
virtual

Implements Thyra::ModelEvaluator< class >.

Definition at line 255 of file CDR_Model_Tpetra_impl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Teuchos::RCP< const Thyra::LinearOpWithSolveFactoryBase< SC > > Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::get_W_factory ( ) const
virtual

Implements Thyra::ModelEvaluator< class >.

Definition at line 276 of file CDR_Model_Tpetra_impl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Thyra::ModelEvaluatorBase::InArgs< SC > Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::createInArgs ( ) const
virtual

Implements Thyra::ModelEvaluator< class >.

Definition at line 283 of file CDR_Model_Tpetra_impl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Teuchos::RCP<::Thyra::PreconditionerBase< SC > > Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::create_W_prec ( ) const
virtual

Implements Thyra::ModelEvaluator< class >.

Definition at line 264 of file CDR_Model_Tpetra_impl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Teuchos::RCP< const Tpetra::CrsGraph< LO, GO, Node > > Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::createGraph ( )
privatevirtual

Allocates and returns the Jacobian matrix graph

Definition at line 159 of file CDR_Model_Tpetra_impl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Thyra::ModelEvaluatorBase::OutArgs< SC > Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::createOutArgsImpl ( ) const
private

Definition at line 292 of file CDR_Model_Tpetra_impl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
void Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::evalModelImpl ( const ::Thyra::ModelEvaluatorBase::InArgs< SC > &  inArgs,
const ::Thyra::ModelEvaluatorBase::OutArgs< SC > &  outArgs 
) const
private

Definition at line 298 of file CDR_Model_Tpetra_impl.hpp.

Member Data Documentation

template<typename SC , typename LO , typename GO , typename Node >
const Teuchos::RCP<const Teuchos::Comm<int> > Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::comm_
private

Definition at line 100 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
const int Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::numGlobalElements_
private

Definition at line 101 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
const SC Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::zMin_
private

Definition at line 102 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
const SC Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::zMax_
private

Definition at line 103 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
const SC Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::a_
private

Definition at line 104 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
const SC Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::k_
private

Definition at line 105 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Teuchos::RCP<const ::Thyra::VectorSpaceBase<SC> > Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::xSpace_
private

Definition at line 107 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Teuchos::RCP<const tpetra_map> Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::xOwnedMap_
private

Definition at line 108 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Teuchos::RCP<const tpetra_map> Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::xGhostedMap_
private

Definition at line 109 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Teuchos::RCP<const Tpetra::Import<LO, GO, Node> > Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::importer_
private

Definition at line 110 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Teuchos::RCP<const ::Thyra::VectorSpaceBase<SC> > Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::fSpace_
private

Definition at line 112 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Teuchos::RCP<const tpetra_map> Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::fOwnedMap_
private

Definition at line 113 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Teuchos::RCP<const tpetra_graph> Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::wGraph_
private

Definition at line 115 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Teuchos::RCP<const ::Thyra::LinearOpWithSolveFactoryBase<SC> > Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::wFactory_
private

Definition at line 117 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Teuchos::RCP<tpetra_vec> Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::nodeCoordinates_
private

Definition at line 119 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Teuchos::RCP<tpetra_vec> Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::GhostedNodeCoordinates_
private

Definition at line 120 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Teuchos::RCP<tpetra_vec> Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::uPtr_
mutableprivate

Definition at line 122 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Teuchos::RCP<tpetra_vec> Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::uDotPtr_
mutableprivate

Definition at line 123 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Teuchos::RCP<tpetra_vec> Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::xPtr_
mutableprivate

Definition at line 124 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Teuchos::RCP<tpetra_vec> Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::jDiag_
mutableprivate

Definition at line 126 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
::Thyra::ModelEvaluatorBase::InArgs<SC> Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::nominalValues_
private

Definition at line 128 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Teuchos::RCP<::Thyra::VectorBase<SC> > Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::x0_
private

Definition at line 129 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
Teuchos::Array<SC> Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::p_
private

Definition at line 130 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
bool Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::showGetInvalidArg_
private

Definition at line 131 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
::Thyra::ModelEvaluatorBase::InArgs<SC> Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::prototypeInArgs_
private

Definition at line 132 of file CDR_Model_Tpetra_decl.hpp.

template<typename SC , typename LO , typename GO , typename Node >
::Thyra::ModelEvaluatorBase::OutArgs<SC> Tempus_Test::CDR_Model_Tpetra< SC, LO, GO, Node >::prototypeOutArgs_
private

Definition at line 133 of file CDR_Model_Tpetra_decl.hpp.


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