42 #ifndef TWOD_DIFFUSION_PROBLEM_TPETRA_HPP
43 #define TWOD_DIFFUSION_PROBLEM_TPETRA_HPP
49 #include "Tpetra_Map.hpp"
50 #include "Tpetra_Vector.hpp"
51 #include "Tpetra_Import.hpp"
52 #include "Tpetra_CrsGraph.hpp"
53 #include "Tpetra_CrsMatrix.hpp"
69 typedef Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node>
Tpetra_Map;
70 typedef Tpetra::Vector<Scalar,LocalOrdinal,GlobalOrdinal,Node>
Tpetra_Vector;
79 LocalOrdinal n, LocalOrdinal d,
80 BasisScalar s = 0.1, BasisScalar mu = 0.2,
132 template <
typename FuncT>
186 BasisScalar mean, BasisScalar std_dev,
187 MeshScalar L, LocalOrdinal num_KL);
194 template <
typename DiffusionFunc>
211 #endif // TWOD_DIFFUSION_ME_HPP
Scalar operator()(MeshScalar x, MeshScalar y, const Teuchos::Array< Scalar > &rv) const
Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > Tpetra_Map
Teuchos::RCP< Epetra_Operator > create_W() const
Create W = alpha*M + beta*J matrix.
KL_Diffusion_Func(MeshScalar xyLeft, MeshScalar xyRight, BasisScalar mean, BasisScalar std_dev, MeshScalar L, LocalOrdinal num_KL)
Teuchos::RCP< const Epetra_Map > get_g_map(int j) const
Return response function map.
Teuchos::RCP< const Epetra_Map > get_p_map(int l) const
Return parameter vector map.
Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > Tpetra_Operator
Teuchos::RCP< const Tpetra_Map > p_map
Parameter vector map.
void computeResidual(const Epetra_Vector &x, const Epetra_Vector &p, Epetra_Vector &f)
Compute residual.
void computeResponse(const Epetra_Vector &x, const Epetra_Vector &p, Epetra_Vector &g)
Compute response.
Teuchos::RCP< const Epetra_Vector > get_p_init(int l) const
Return initial parameters.
Teuchos::RCP< LogNormal_Diffusion_Func< KL_Diffusion_Func > > lnFunc
Teuchos::RCP< const Epetra_Map > get_x_map() const
Return solution vector map.
void computeJacobian(const Epetra_Vector &x, const Epetra_Vector &p, Epetra_Operator &J)
Compute Jacobian.
Teuchos::RCP< Tpetra_Vector > x_init
Initial guess.
Scalar operator()(MeshScalar x, MeshScalar y, const Teuchos::Array< Scalar > &rv) const
Teuchos::RCP< const Tpetra_Map > g_map
Response vector map.
Tpetra::Import< LocalOrdinal, GlobalOrdinal, Node > Tpetra_Import
Teuchos::Array< MeshPoint > mesh
Teuchos::RCP< Stokhos::KL::ExponentialRandomField< MeshScalar > > rf
Teuchos::RCP< KL_Diffusion_Func > klFunc
Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > Tpetra_CrsGraph
LogNormal_Diffusion_Func(const DiffusionFunc &func_)
KokkosClassic::DefaultNode::DefaultNodeType Node
Teuchos::RCP< const Tpetra_Map > x_map
Solution vector map.
Teuchos::RCP< const Epetra_Vector > get_x_init() const
Return initial solution.
Teuchos::RCP< const Epetra_Map > get_f_map() const
Return residual vector map.
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.
KOKKOS_INLINE_FUNCTION PCE< Storage > exp(const PCE< Storage > &a)
Teuchos::Array< GlobalOrdinal > bcIndices
Tpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > Tpetra_Vector
Teuchos::RCP< const Teuchos::Array< std::string > > get_p_names(int l) const
Return array of parameter names.
Teuchos::RCP< Tpetra_CrsMatrix > A
Matrix to store operator.
Teuchos::RCP< Tpetra_Import > importer
Importer to overlapped distribution.
ScalarType f(const Teuchos::Array< ScalarType > &x, double a, double b)
Teuchos::RCP< Tpetra_Vector > b
RHS.
const DiffusionFunc & func
Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > Tpetra_CrsMatrix
Teuchos::RCP< Teuchos::Array< std::string > > p_names
Parameter names.
Teuchos::RCP< Tpetra_Vector > p_init
Initial parameters.
void computeA(const FuncT &func, const Tpetra_Vector &p, Tpetra_CrsMatrix &jac)
Fill coefficient matrix given function to evaluate diffusion coefficient.
Teuchos::Array< MeshScalar > point
Teuchos::RCP< Tpetra_CrsGraph > graph
Jacobian graph.
ScalarType g(const Teuchos::Array< ScalarType > &x, const ScalarType &y)
A linear 2-D diffusion problem.