Stokhos Package Browser (Single Doxygen Collection)
Version of the Day
|
A linear 2-D diffusion problem. More...
#include <twoD_diffusion_problem.hpp>
Classes | |
struct | KL_Diffusion_Func |
struct | LogNormal_Diffusion_Func |
struct | MeshPoint |
Public Types | |
typedef Tpetra::Map < LocalOrdinal, GlobalOrdinal, Node > | Tpetra_Map |
typedef Tpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > | Tpetra_Vector |
typedef Tpetra::Operator < Scalar, LocalOrdinal, GlobalOrdinal, Node > | Tpetra_Operator |
typedef Tpetra::CrsMatrix < Scalar, LocalOrdinal, GlobalOrdinal, Node > | Tpetra_CrsMatrix |
typedef Tpetra::CrsGraph < LocalOrdinal, GlobalOrdinal, Node > | Tpetra_CrsGraph |
typedef Tpetra::Import < LocalOrdinal, GlobalOrdinal, Node > | Tpetra_Import |
Public Member Functions | |
twoD_diffusion_problem (const Teuchos::RCP< const Epetra_Comm > &comm, int n, int d, double s=0.1, double mu=0.2, const Teuchos::RCP< const Stokhos::OrthogPolyBasis< int, double > > &basis=Teuchos::null, bool log_normal=false, bool eliminate_bcs=false) | |
Constructor. More... | |
Teuchos::RCP< Epetra_CrsMatrix > | get_mean () const |
Get mean matrix. More... | |
twoD_diffusion_problem (const Teuchos::RCP< const Teuchos::Comm< int > > &comm, LocalOrdinal n, LocalOrdinal d, BasisScalar s=0.1, BasisScalar mu=0.2, bool log_normal=false, bool eliminate_bcs=false) | |
Constructor. More... | |
Protected Member Functions | |
template<typename FuncT > | |
void | fillMatrices (const FuncT &func, int sz) |
Fill coefficient matrix given function to evaluate diffusion coefficient. More... | |
void | compute_A (const Epetra_Vector &p) |
Compute A matrix. More... | |
template<typename FuncT > | |
void | computeA (const FuncT &func, const Tpetra_Vector &p, Tpetra_CrsMatrix &jac) |
Fill coefficient matrix given function to evaluate diffusion coefficient. More... | |
A linear 2-D diffusion problem.
Definition at line 26 of file twoD_diffusion_problem.hpp.
typedef Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::Tpetra_Map |
Definition at line 37 of file twoD_diffusion_problem_tpetra.hpp.
typedef Tpetra::Vector<Scalar,LocalOrdinal,GlobalOrdinal,Node> twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::Tpetra_Vector |
Definition at line 38 of file twoD_diffusion_problem_tpetra.hpp.
typedef Tpetra::Operator<Scalar,LocalOrdinal,GlobalOrdinal,Node> twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::Tpetra_Operator |
Definition at line 39 of file twoD_diffusion_problem_tpetra.hpp.
typedef Tpetra::CrsMatrix<Scalar,LocalOrdinal,GlobalOrdinal,Node> twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::Tpetra_CrsMatrix |
Definition at line 40 of file twoD_diffusion_problem_tpetra.hpp.
typedef Tpetra::CrsGraph<LocalOrdinal,GlobalOrdinal,Node> twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::Tpetra_CrsGraph |
Definition at line 41 of file twoD_diffusion_problem_tpetra.hpp.
typedef Tpetra::Import<LocalOrdinal,GlobalOrdinal,Node> twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::Tpetra_Import |
Definition at line 42 of file twoD_diffusion_problem_tpetra.hpp.
twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::twoD_diffusion_problem | ( | const Teuchos::RCP< const Epetra_Comm > & | comm, |
int | n, | ||
int | d, | ||
double | s = 0.1 , |
||
double | mu = 0.2 , |
||
const Teuchos::RCP< const Stokhos::OrthogPolyBasis< int, double > > & | basis = Teuchos::null , |
||
bool | log_normal = false , |
||
bool | eliminate_bcs = false |
||
) |
Constructor.
Definition at line 128 of file twoD_diffusion_problem.cpp.
twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::twoD_diffusion_problem | ( | const Teuchos::RCP< const Teuchos::Comm< int > > & | comm, |
LocalOrdinal | n, | ||
LocalOrdinal | d, | ||
BasisScalar | s = 0.1 , |
||
BasisScalar | mu = 0.2 , |
||
bool | log_normal = false , |
||
bool | eliminate_bcs = false |
||
) |
Constructor.
Definition at line 14 of file twoD_diffusion_problem_tpetra_def.hpp.
Teuchos::RCP< const typename twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::Tpetra_Map > twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::get_x_map | ( | ) | const |
Return solution vector map.
Definition at line 282 of file twoD_diffusion_problem.cpp.
Teuchos::RCP< const typename twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::Tpetra_Map > twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::get_f_map | ( | ) | const |
Return residual vector map.
Definition at line 289 of file twoD_diffusion_problem.cpp.
Teuchos::RCP< const typename twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::Tpetra_Map > twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::get_p_map | ( | int | l | ) | const |
Return parameter vector map.
Definition at line 296 of file twoD_diffusion_problem.cpp.
Teuchos::RCP< const typename twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::Tpetra_Map > twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::get_g_map | ( | int | j | ) | const |
Return response function map.
Definition at line 309 of file twoD_diffusion_problem.cpp.
Teuchos::RCP< const Teuchos::Array< std::string > > twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::get_p_names | ( | int | l | ) | const |
Return array of parameter names.
Definition at line 322 of file twoD_diffusion_problem.cpp.
Teuchos::RCP< const typename twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::Tpetra_Vector > twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::get_x_init | ( | ) | const |
Return initial solution.
Definition at line 335 of file twoD_diffusion_problem.cpp.
Teuchos::RCP< const typename twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::Tpetra_Vector > twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::get_p_init | ( | int | l | ) | const |
Return initial parameters.
Definition at line 342 of file twoD_diffusion_problem.cpp.
Teuchos::RCP< typename twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::Tpetra_CrsMatrix > twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::create_W | ( | ) | const |
Create W = alpha*M + beta*J matrix.
Definition at line 355 of file twoD_diffusion_problem.cpp.
void twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::computeResidual | ( | const Epetra_Vector & | x, |
const Epetra_Vector & | p, | ||
Epetra_Vector & | f | ||
) |
Compute residual.
Definition at line 366 of file twoD_diffusion_problem.cpp.
void twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::computeJacobian | ( | const Epetra_Vector & | x, |
const Epetra_Vector & | p, | ||
Epetra_Operator & | J | ||
) |
Compute Jacobian.
Definition at line 378 of file twoD_diffusion_problem.cpp.
void twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::computeResponse | ( | const Epetra_Vector & | x, |
const Epetra_Vector & | p, | ||
Epetra_Vector & | g | ||
) |
Compute response.
Definition at line 392 of file twoD_diffusion_problem.cpp.
void twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::computeSGResidual | ( | const Stokhos::EpetraVectorOrthogPoly & | x_sg, |
const Stokhos::EpetraVectorOrthogPoly & | p_sg, | ||
Stokhos::OrthogPolyExpansion< int, double > & | expn, | ||
Stokhos::EpetraVectorOrthogPoly & | f_sg | ||
) |
Compute SG residual.
Definition at line 403 of file twoD_diffusion_problem.cpp.
void twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::computeSGJacobian | ( | const Stokhos::EpetraVectorOrthogPoly & | x_sg, |
const Stokhos::EpetraVectorOrthogPoly & | p_sg, | ||
Stokhos::EpetraOperatorOrthogPoly & | J_sg | ||
) |
Compute Jacobian.
Definition at line 446 of file twoD_diffusion_problem.cpp.
void twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::computeSGResponse | ( | const Stokhos::EpetraVectorOrthogPoly & | x_sg, |
const Stokhos::EpetraVectorOrthogPoly & | p_sg, | ||
Stokhos::EpetraVectorOrthogPoly & | g_sg | ||
) |
Compute SG response.
Definition at line 461 of file twoD_diffusion_problem.cpp.
|
inline |
Get mean matrix.
Definition at line 100 of file twoD_diffusion_problem.hpp.
|
protected |
Fill coefficient matrix given function to evaluate diffusion coefficient.
Definition at line 475 of file twoD_diffusion_problem.cpp.
|
protected |
Compute A matrix.
Definition at line 538 of file twoD_diffusion_problem.cpp.
Teuchos::RCP<const Tpetra_Map> twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::get_x_map | ( | ) | const |
Return solution vector map.
Teuchos::RCP<const Tpetra_Map> twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::get_f_map | ( | ) | const |
Return residual vector map.
Teuchos::RCP<const Tpetra_Map> twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::get_p_map | ( | LocalOrdinal | l | ) | const |
Return parameter vector map.
Teuchos::RCP<const Tpetra_Map> twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::get_g_map | ( | LocalOrdinal | j | ) | const |
Return response function map.
Teuchos::RCP<const Teuchos::Array<std::string> > twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::get_p_names | ( | LocalOrdinal | l | ) | const |
Return array of parameter names.
Teuchos::RCP<const Tpetra_Vector> twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::get_x_init | ( | ) | const |
Return initial solution.
Teuchos::RCP<const Tpetra_Vector> twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::get_p_init | ( | LocalOrdinal | l | ) | const |
Return initial parameters.
Teuchos::RCP<Tpetra_CrsMatrix> twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::create_W | ( | ) | const |
Create W = alpha*M + beta*J matrix.
void twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::computeResidual | ( | const Tpetra_Vector & | x, |
const Tpetra_Vector & | p, | ||
Tpetra_Vector & | f | ||
) |
Compute residual.
Definition at line 287 of file twoD_diffusion_problem_tpetra_def.hpp.
void twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::computeJacobian | ( | const Tpetra_Vector & | x, |
const Tpetra_Vector & | p, | ||
Tpetra_CrsMatrix & | J | ||
) |
Compute Jacobian.
Definition at line 305 of file twoD_diffusion_problem_tpetra_def.hpp.
void twoD_diffusion_problem< Scalar, MeshScalar, BasisScalar, LocalOrdinal, GlobalOrdinal, Node >::computeResponse | ( | const Tpetra_Vector & | x, |
const Tpetra_Vector & | p, | ||
Tpetra_Vector & | g | ||
) |
Compute response.
Definition at line 320 of file twoD_diffusion_problem_tpetra_def.hpp.
|
protected |
Fill coefficient matrix given function to evaluate diffusion coefficient.
Definition at line 336 of file twoD_diffusion_problem_tpetra_def.hpp.
|
protected |
Definition at line 113 of file twoD_diffusion_problem.hpp.
|
protected |
Definition at line 120 of file twoD_diffusion_problem.hpp.
|
protected |
Definition at line 121 of file twoD_diffusion_problem.hpp.
|
protected |
Definition at line 123 of file twoD_diffusion_problem.hpp.
|
protected |
Definition at line 124 of file twoD_diffusion_problem.hpp.
|
protected |
Definition at line 125 of file twoD_diffusion_problem.hpp.
|
protected |
Solution vector map.
Definition at line 128 of file twoD_diffusion_problem.hpp.
|
protected |
Importer to overlapped distribution.
Definition at line 131 of file twoD_diffusion_problem.hpp.
|
protected |
Initial guess.
Definition at line 134 of file twoD_diffusion_problem.hpp.
|
protected |
Parameter vector map.
Definition at line 137 of file twoD_diffusion_problem.hpp.
|
protected |
Response vector map.
Definition at line 140 of file twoD_diffusion_problem.hpp.
|
protected |
Initial parameters.
Definition at line 143 of file twoD_diffusion_problem.hpp.
|
protected |
Parameter names.
Definition at line 146 of file twoD_diffusion_problem.hpp.
|
protected |
Jacobian graph.
Definition at line 149 of file twoD_diffusion_problem.hpp.
|
protected |
KL coefficients of operator.
Definition at line 152 of file twoD_diffusion_problem.hpp.
|
protected |
Deterministic RHS.
Definition at line 155 of file twoD_diffusion_problem.hpp.
|
mutableprotected |
Vectors to store matrix-vector products in SG residual calculation.
Definition at line 158 of file twoD_diffusion_problem.hpp.
|
protected |
Matrix to store deterministic operator.
Definition at line 161 of file twoD_diffusion_problem.hpp.
|
mutableprotected |
Array to store a point for basis evaluation.
Definition at line 164 of file twoD_diffusion_problem.hpp.
|
mutableprotected |
Array to store values of basis at a point.
Definition at line 167 of file twoD_diffusion_problem.hpp.
|
protected |
Definition at line 107 of file twoD_diffusion_problem_tpetra.hpp.
|
protected |
Definition at line 115 of file twoD_diffusion_problem_tpetra.hpp.
|
protected |
Solution vector map.
Definition at line 120 of file twoD_diffusion_problem_tpetra.hpp.
|
protected |
Importer to overlapped distribution.
Definition at line 123 of file twoD_diffusion_problem_tpetra.hpp.
|
protected |
Initial guess.
Definition at line 126 of file twoD_diffusion_problem_tpetra.hpp.
|
protected |
Parameter vector map.
Definition at line 129 of file twoD_diffusion_problem_tpetra.hpp.
|
protected |
Response vector map.
Definition at line 132 of file twoD_diffusion_problem_tpetra.hpp.
|
protected |
Initial parameters.
Definition at line 135 of file twoD_diffusion_problem_tpetra.hpp.
|
protected |
Jacobian graph.
Definition at line 141 of file twoD_diffusion_problem_tpetra.hpp.
|
protected |
RHS.
Definition at line 144 of file twoD_diffusion_problem_tpetra.hpp.
|
protected |
Matrix to store operator.
Definition at line 147 of file twoD_diffusion_problem_tpetra.hpp.
|
protected |
Definition at line 172 of file twoD_diffusion_problem_tpetra.hpp.
|
protected |
Definition at line 173 of file twoD_diffusion_problem_tpetra.hpp.