Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus_Test::CDR_Model< Scalar > Class Template Reference

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

#include <CDR_Model_decl.hpp>

Inheritance diagram for Tempus_Test::CDR_Model< Scalar >:

Public Member Functions

 CDR_Model (const Teuchos::RCP< const Epetra_Comm > &comm, const int num_global_elements, const Scalar z_min, const Scalar z_max, const Scalar a, const Scalar k)
 
Initializers/Accessors
void set_x0 (const Teuchos::ArrayView< const Scalar > &x0)
 
void setShowGetInvalidArgs (bool showGetInvalidArg)
 
void set_W_factory (const Teuchos::RCP< const ::Thyra::LinearOpWithSolveFactoryBase< Scalar > > &W_factory)
 
Public functions overridden from ModelEvaluator.
Teuchos::RCP< const
::Thyra::VectorSpaceBase
< Scalar > > 
get_x_space () const
 
Teuchos::RCP< const
::Thyra::VectorSpaceBase
< Scalar > > 
get_f_space () const
 
::Thyra::ModelEvaluatorBase::InArgs
< Scalar > 
getNominalValues () const
 
Teuchos::RCP
< Thyra::LinearOpWithSolveBase
< double > > 
create_W () const
 
Teuchos::RCP
< ::Thyra::LinearOpBase
< Scalar > > 
create_W_op () const
 
Teuchos::RCP< const
::Thyra::LinearOpWithSolveFactoryBase
< Scalar > > 
get_W_factory () const
 
::Thyra::ModelEvaluatorBase::InArgs
< Scalar > 
createInArgs () const
 
Teuchos::RCP
< ::Thyra::PreconditionerBase
< Scalar > > 
create_W_prec () const
 

Private Member Functions

virtual Teuchos::RCP
< Epetra_CrsGraph > 
createGraph ()
 
Private functions overridden from ModelEvaluatorDefaultBase.
::Thyra::ModelEvaluatorBase::OutArgs
< Scalar > 
createOutArgsImpl () const
 
void evalModelImpl (const ::Thyra::ModelEvaluatorBase::InArgs< Scalar > &inArgs, const ::Thyra::ModelEvaluatorBase::OutArgs< Scalar > &outArgs) const
 

Private Attributes

const Teuchos::RCP< const
Epetra_Comm > 
comm_
 
const int num_global_elements_
 
const Scalar z_min_
 
const Scalar z_max_
 
const Scalar a_
 
const Scalar k_
 
Teuchos::RCP< const
::Thyra::VectorSpaceBase
< Scalar > > 
x_space_
 
Teuchos::RCP< const Epetra_Map > x_owned_map_
 
Teuchos::RCP< const Epetra_Map > x_ghosted_map_
 
Teuchos::RCP< const Epetra_Import > importer_
 
Teuchos::RCP< const
::Thyra::VectorSpaceBase
< Scalar > > 
f_space_
 
Teuchos::RCP< const Epetra_Map > f_owned_map_
 
Teuchos::RCP< Epetra_CrsGraph > W_graph_
 
Teuchos::RCP< const
::Thyra::LinearOpWithSolveFactoryBase
< Scalar > > 
W_factory_
 
Teuchos::RCP< Epetra_Vector > node_coordinates_
 
Teuchos::RCP< Epetra_Vector > ghosted_node_coordinates_
 
Teuchos::RCP< Epetra_Vector > u_ptr
 
Teuchos::RCP< Epetra_Vector > u_dot_ptr
 
Teuchos::RCP< Epetra_Vector > x_ptr
 
Teuchos::RCP< Epetra_Vector > J_diagonal_
 
::Thyra::ModelEvaluatorBase::InArgs
< Scalar > 
nominalValues_
 
Teuchos::RCP
< ::Thyra::VectorBase< Scalar > > 
x0_
 
Teuchos::Array< Scalar > p_
 
bool showGetInvalidArg_
 
::Thyra::ModelEvaluatorBase::InArgs
< Scalar > 
prototypeInArgs_
 
::Thyra::ModelEvaluatorBase::OutArgs
< Scalar > 
prototypeOutArgs_
 

Detailed Description

template<class Scalar>
class Tempus_Test::CDR_Model< Scalar >

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 45 of file CDR_Model_decl.hpp.

Constructor & Destructor Documentation

template<class Scalar >
Tempus_Test::CDR_Model< Scalar >::CDR_Model ( const Teuchos::RCP< const Epetra_Comm > &  comm,
const int  num_global_elements,
const Scalar  z_min,
const Scalar  z_max,
const Scalar  a,
const Scalar  k 
)

Definition at line 38 of file CDR_Model_impl.hpp.

Member Function Documentation

template<class Scalar >
Teuchos::RCP< Thyra::LinearOpWithSolveBase< double > > Tempus_Test::CDR_Model< Scalar >::create_W ( ) const

Definition at line 246 of file CDR_Model_impl.hpp.

template<class Scalar >
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > Tempus_Test::CDR_Model< Scalar >::create_W_op ( ) const

Definition at line 263 of file CDR_Model_impl.hpp.

template<class Scalar >
Teuchos::RCP<::Thyra::PreconditionerBase< Scalar > > Tempus_Test::CDR_Model< Scalar >::create_W_prec ( ) const

Definition at line 273 of file CDR_Model_impl.hpp.

template<class Scalar >
Teuchos::RCP< Epetra_CrsGraph > Tempus_Test::CDR_Model< Scalar >::createGraph ( )
privatevirtual

Allocates and returns the Jacobian matrix graph

Definition at line 159 of file CDR_Model_impl.hpp.

template<class Scalar >
Thyra::ModelEvaluatorBase::InArgs< Scalar > Tempus_Test::CDR_Model< Scalar >::createInArgs ( ) const

Definition at line 299 of file CDR_Model_impl.hpp.

template<class Scalar >
Thyra::ModelEvaluatorBase::OutArgs< Scalar > Tempus_Test::CDR_Model< Scalar >::createOutArgsImpl ( ) const
private

Definition at line 310 of file CDR_Model_impl.hpp.

template<class Scalar >
void Tempus_Test::CDR_Model< Scalar >::evalModelImpl ( const ::Thyra::ModelEvaluatorBase::InArgs< Scalar > &  inArgs,
const ::Thyra::ModelEvaluatorBase::OutArgs< Scalar > &  outArgs 
) const
private

Definition at line 317 of file CDR_Model_impl.hpp.

template<class Scalar >
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > Tempus_Test::CDR_Model< Scalar >::get_f_space ( ) const

Definition at line 230 of file CDR_Model_impl.hpp.

template<class Scalar >
Teuchos::RCP< const Thyra::LinearOpWithSolveFactoryBase< Scalar > > Tempus_Test::CDR_Model< Scalar >::get_W_factory ( ) const

Definition at line 291 of file CDR_Model_impl.hpp.

template<class Scalar >
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > Tempus_Test::CDR_Model< Scalar >::get_x_space ( ) const

Definition at line 222 of file CDR_Model_impl.hpp.

template<class Scalar >
Thyra::ModelEvaluatorBase::InArgs< Scalar > Tempus_Test::CDR_Model< Scalar >::getNominalValues ( ) const

Definition at line 238 of file CDR_Model_impl.hpp.

template<class Scalar >
void Tempus_Test::CDR_Model< Scalar >::set_W_factory ( const Teuchos::RCP< const ::Thyra::LinearOpWithSolveFactoryBase< Scalar > > &  W_factory)

Definition at line 212 of file CDR_Model_impl.hpp.

template<class Scalar >
void Tempus_Test::CDR_Model< Scalar >::set_x0 ( const Teuchos::ArrayView< const Scalar > &  x0)

Definition at line 194 of file CDR_Model_impl.hpp.

template<class Scalar >
void Tempus_Test::CDR_Model< Scalar >::setShowGetInvalidArgs ( bool  showGetInvalidArg)

Definition at line 205 of file CDR_Model_impl.hpp.

Member Data Documentation

template<class Scalar >
const Scalar Tempus_Test::CDR_Model< Scalar >::a_
private

Definition at line 103 of file CDR_Model_decl.hpp.

template<class Scalar >
const Teuchos::RCP<const Epetra_Comm> Tempus_Test::CDR_Model< Scalar >::comm_
private

Definition at line 99 of file CDR_Model_decl.hpp.

template<class Scalar >
Teuchos::RCP<const Epetra_Map> Tempus_Test::CDR_Model< Scalar >::f_owned_map_
private

Definition at line 112 of file CDR_Model_decl.hpp.

template<class Scalar >
Teuchos::RCP<const ::Thyra::VectorSpaceBase<Scalar> > Tempus_Test::CDR_Model< Scalar >::f_space_
private

Definition at line 111 of file CDR_Model_decl.hpp.

template<class Scalar >
Teuchos::RCP<Epetra_Vector> Tempus_Test::CDR_Model< Scalar >::ghosted_node_coordinates_
private

Definition at line 119 of file CDR_Model_decl.hpp.

template<class Scalar >
Teuchos::RCP<const Epetra_Import> Tempus_Test::CDR_Model< Scalar >::importer_
private

Definition at line 109 of file CDR_Model_decl.hpp.

template<class Scalar >
Teuchos::RCP<Epetra_Vector> Tempus_Test::CDR_Model< Scalar >::J_diagonal_
mutableprivate

Definition at line 125 of file CDR_Model_decl.hpp.

template<class Scalar >
const Scalar Tempus_Test::CDR_Model< Scalar >::k_
private

Definition at line 104 of file CDR_Model_decl.hpp.

template<class Scalar >
Teuchos::RCP<Epetra_Vector> Tempus_Test::CDR_Model< Scalar >::node_coordinates_
private

Definition at line 118 of file CDR_Model_decl.hpp.

template<class Scalar >
::Thyra::ModelEvaluatorBase::InArgs<Scalar> Tempus_Test::CDR_Model< Scalar >::nominalValues_
private

Definition at line 127 of file CDR_Model_decl.hpp.

template<class Scalar >
const int Tempus_Test::CDR_Model< Scalar >::num_global_elements_
private

Definition at line 100 of file CDR_Model_decl.hpp.

template<class Scalar >
Teuchos::Array<Scalar> Tempus_Test::CDR_Model< Scalar >::p_
private

Definition at line 129 of file CDR_Model_decl.hpp.

template<class Scalar >
::Thyra::ModelEvaluatorBase::InArgs<Scalar> Tempus_Test::CDR_Model< Scalar >::prototypeInArgs_
private

Definition at line 131 of file CDR_Model_decl.hpp.

template<class Scalar >
::Thyra::ModelEvaluatorBase::OutArgs<Scalar> Tempus_Test::CDR_Model< Scalar >::prototypeOutArgs_
private

Definition at line 132 of file CDR_Model_decl.hpp.

template<class Scalar >
bool Tempus_Test::CDR_Model< Scalar >::showGetInvalidArg_
private

Definition at line 130 of file CDR_Model_decl.hpp.

template<class Scalar >
Teuchos::RCP<Epetra_Vector> Tempus_Test::CDR_Model< Scalar >::u_dot_ptr
mutableprivate

Definition at line 122 of file CDR_Model_decl.hpp.

template<class Scalar >
Teuchos::RCP<Epetra_Vector> Tempus_Test::CDR_Model< Scalar >::u_ptr
mutableprivate

Definition at line 121 of file CDR_Model_decl.hpp.

template<class Scalar >
Teuchos::RCP<const ::Thyra::LinearOpWithSolveFactoryBase<Scalar> > Tempus_Test::CDR_Model< Scalar >::W_factory_
private

Definition at line 116 of file CDR_Model_decl.hpp.

template<class Scalar >
Teuchos::RCP<Epetra_CrsGraph> Tempus_Test::CDR_Model< Scalar >::W_graph_
private

Definition at line 114 of file CDR_Model_decl.hpp.

template<class Scalar >
Teuchos::RCP< ::Thyra::VectorBase<Scalar> > Tempus_Test::CDR_Model< Scalar >::x0_
private

Definition at line 128 of file CDR_Model_decl.hpp.

template<class Scalar >
Teuchos::RCP<const Epetra_Map> Tempus_Test::CDR_Model< Scalar >::x_ghosted_map_
private

Definition at line 108 of file CDR_Model_decl.hpp.

template<class Scalar >
Teuchos::RCP<const Epetra_Map> Tempus_Test::CDR_Model< Scalar >::x_owned_map_
private

Definition at line 107 of file CDR_Model_decl.hpp.

template<class Scalar >
Teuchos::RCP<Epetra_Vector> Tempus_Test::CDR_Model< Scalar >::x_ptr
mutableprivate

Definition at line 123 of file CDR_Model_decl.hpp.

template<class Scalar >
Teuchos::RCP<const ::Thyra::VectorSpaceBase<Scalar> > Tempus_Test::CDR_Model< Scalar >::x_space_
private

Definition at line 106 of file CDR_Model_decl.hpp.

template<class Scalar >
const Scalar Tempus_Test::CDR_Model< Scalar >::z_max_
private

Definition at line 102 of file CDR_Model_decl.hpp.

template<class Scalar >
const Scalar Tempus_Test::CDR_Model< Scalar >::z_min_
private

Definition at line 101 of file CDR_Model_decl.hpp.


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