Stokhos Package Browser (Single Doxygen Collection)
Version of the Day
|
Nonlinear, stochastic Galerkin ModelEvaluator that constructs a interlaced Jacobian. More...
#include <Stokhos_SGModelEvaluator_Interlaced.hpp>
Public Member Functions | |
SGModelEvaluator_Interlaced (const Teuchos::RCP< EpetraExt::ModelEvaluator > &me, const Teuchos::RCP< const Stokhos::OrthogPolyBasis< int, double > > &sg_basis, const Teuchos::RCP< const Stokhos::Quadrature< int, double > > &sg_quad, const Teuchos::RCP< Stokhos::OrthogPolyExpansion< int, double > > &sg_exp, const Teuchos::RCP< const Stokhos::ParallelData > &sg_parallel_data, const Teuchos::RCP< Teuchos::ParameterList > ¶ms, bool scaleOP=true) | |
Public Member Functions inherited from Stokhos::SGModelEvaluatorBase | |
SGModelEvaluatorBase () | |
virtual | ~SGModelEvaluatorBase () |
Destructor. More... | |
Static Public Member Functions | |
static Teuchos::RCP< Epetra_Map > | buildInterlaceMap (const Epetra_BlockMap &determ_map, const Epetra_BlockMap &stocha_map) |
static void | copyToInterlacedVector (const Stokhos::EpetraVectorOrthogPoly &x_sg, Epetra_Vector &x) |
static void | copyToPolyOrthogVector (const Epetra_Vector &x, Stokhos::EpetraVectorOrthogPoly &x_sg) |
Overridden from EpetraExt::ModelEvaluator . | |
Teuchos::RCP< const Epetra_Map > | get_x_map () const |
Return solution vector map. More... | |
Teuchos::RCP< const Epetra_Map > | get_p_map (int l) const |
Return parameter vector map. More... | |
Teuchos::RCP< const Teuchos::Array< std::string > > | get_p_names (int l) const |
Return array of parameter names. More... | |
Teuchos::RCP< const Epetra_Vector > | get_x_init () const |
Return initial solution. More... | |
Teuchos::RCP< const Epetra_Vector > | get_p_init (int l) const |
Return initial parameters. More... | |
Teuchos::RCP< const Epetra_Map > | get_f_map () const |
Return residual vector map. More... | |
Teuchos::RCP< const Epetra_Map > | get_g_map (int l) const |
Return response map. More... | |
Teuchos::RCP< Epetra_Operator > | create_W () const |
Create W = alpha*M + beta*J matrix. More... | |
InArgs | createInArgs () const |
Create InArgs. More... | |
OutArgs | createOutArgs () const |
Create OutArgs. More... | |
void | evalModel (const InArgs &inArgs, const OutArgs &outArgs) const |
Evaluate model on InArgs. More... | |
Nonlinear, stochastic Galerkin ModelEvaluator that constructs a interlaced Jacobian.
SGModelEvaluator_Interlaced is an implementation of EpetraExt::ModelEvaluator that generates a nonlinear problem from a stochastic Galerkin expansion, the Jacobian and solution vectors are interlaced. It wraps a supplied ModelEvaluator that supports the SG versions of p, x, and possibly x_dot InArgs, and f and W OutArgs, and translates those into a new nonlinear problem. It does so by concatenating all of the SG components of p, x, x_dot, and f into extended block vectors that form the parameters, solution vector, time derivative vector and residual for the new nonlinear problem. Only forming a fully-assembled SG matrix is possible. The W operator of the underlying model evaluator must be an Epetra_CrsMatrix.
Definition at line 82 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
Stokhos::SGModelEvaluator_Interlaced::SGModelEvaluator_Interlaced | ( | const Teuchos::RCP< EpetraExt::ModelEvaluator > & | me, |
const Teuchos::RCP< const Stokhos::OrthogPolyBasis< int, double > > & | sg_basis, | ||
const Teuchos::RCP< const Stokhos::Quadrature< int, double > > & | sg_quad, | ||
const Teuchos::RCP< Stokhos::OrthogPolyExpansion< int, double > > & | sg_exp, | ||
const Teuchos::RCP< const Stokhos::ParallelData > & | sg_parallel_data, | ||
const Teuchos::RCP< Teuchos::ParameterList > & | params, | ||
bool | scaleOP = true |
||
) |
Definition at line 56 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
Teuchos::RCP< const Epetra_Map > Stokhos::SGModelEvaluator_Interlaced::get_x_map | ( | ) | const |
Return solution vector map.
Definition at line 272 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
Teuchos::RCP< const Epetra_Map > Stokhos::SGModelEvaluator_Interlaced::get_p_map | ( | int | l | ) | const |
Return parameter vector map.
Definition at line 284 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
Teuchos::RCP< const Teuchos::Array< std::string > > Stokhos::SGModelEvaluator_Interlaced::get_p_names | ( | int | l | ) | const |
Return array of parameter names.
Definition at line 305 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
Teuchos::RCP< const Epetra_Vector > Stokhos::SGModelEvaluator_Interlaced::get_x_init | ( | ) | const |
Return initial solution.
Definition at line 318 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
Teuchos::RCP< const Epetra_Vector > Stokhos::SGModelEvaluator_Interlaced::get_p_init | ( | int | l | ) | const |
Return initial parameters.
Definition at line 324 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
Teuchos::RCP< const Epetra_Map > Stokhos::SGModelEvaluator_Interlaced::get_f_map | ( | ) | const |
Return residual vector map.
Definition at line 278 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
Teuchos::RCP< const Epetra_Map > Stokhos::SGModelEvaluator_Interlaced::get_g_map | ( | int | l | ) | const |
Return response map.
Definition at line 297 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
Teuchos::RCP< Epetra_Operator > Stokhos::SGModelEvaluator_Interlaced::create_W | ( | ) | const |
Create W = alpha*M + beta*J matrix.
Definition at line 337 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
EpetraExt::ModelEvaluator::InArgs Stokhos::SGModelEvaluator_Interlaced::createInArgs | ( | ) | const |
Create InArgs.
Definition at line 357 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
EpetraExt::ModelEvaluator::OutArgs Stokhos::SGModelEvaluator_Interlaced::createOutArgs | ( | ) | const |
Create OutArgs.
Definition at line 379 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
void Stokhos::SGModelEvaluator_Interlaced::evalModel | ( | const InArgs & | inArgs, |
const OutArgs & | outArgs | ||
) | const |
Evaluate model on InArgs.
Definition at line 410 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
virtual |
Set initial solution polynomial.
Implements Stokhos::SGModelEvaluatorBase.
Definition at line 696 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
virtual |
Return initial SG x.
Implements Stokhos::SGModelEvaluatorBase.
Definition at line 703 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
virtual |
Set initial parameter polynomial.
Implements Stokhos::SGModelEvaluatorBase.
Definition at line 709 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
virtual |
Return initial SG parameters.
Implements Stokhos::SGModelEvaluatorBase.
Definition at line 716 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
virtual |
Get indices of SG parameters.
These indices determine which parameter vectors support SG
Implements Stokhos::SGModelEvaluatorBase.
Definition at line 722 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
virtual |
Get indices of SG responses.
These indices determine which response vectors support SG
Implements Stokhos::SGModelEvaluatorBase.
Definition at line 728 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
virtual |
Get base maps of SG responses.
Implements Stokhos::SGModelEvaluatorBase.
Definition at line 734 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
virtual |
Return overlap stochastic map.
Implements Stokhos::SGModelEvaluatorBase.
Definition at line 743 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
virtual |
Return x sg overlap map.
Implements Stokhos::SGModelEvaluatorBase.
Definition at line 749 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
virtual |
Return x sg importer.
Implements Stokhos::SGModelEvaluatorBase.
Definition at line 755 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
virtual |
Create vector orthog poly using x map and owned sg map.
Implements Stokhos::SGModelEvaluatorBase.
Definition at line 761 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
virtual |
Create vector orthog poly using x map and overlap sg map.
Implements Stokhos::SGModelEvaluatorBase.
Definition at line 776 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
virtual |
Create vector orthog poly using x map and owned sg map.
Implements Stokhos::SGModelEvaluatorBase.
Definition at line 792 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
virtual |
Create vector orthog poly using x map and overlap sg map.
Implements Stokhos::SGModelEvaluatorBase.
Definition at line 808 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
virtual |
Create vector orthog poly using p map.
Implements Stokhos::SGModelEvaluatorBase.
Definition at line 826 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
virtual |
Create vector orthog poly using f map and owned sg map.
Implements Stokhos::SGModelEvaluatorBase.
Definition at line 848 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
virtual |
Create vector orthog poly using f map and overlap sg map.
Implements Stokhos::SGModelEvaluatorBase.
Definition at line 863 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
virtual |
Create multi-vector orthog poly using f map and owned sg map.
Implements Stokhos::SGModelEvaluatorBase.
Definition at line 879 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
virtual |
Create multi-vector orthog poly using f map and overlap sg map.
Implements Stokhos::SGModelEvaluatorBase.
Definition at line 897 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
virtual |
Create vector orthog poly using g map.
Implements Stokhos::SGModelEvaluatorBase.
Definition at line 915 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
virtual |
Create multi-vector orthog poly using g map.
Implements Stokhos::SGModelEvaluatorBase.
Definition at line 939 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
static |
Build an interlaced map containing stochastic degrees of freedom for each element of the detministic map. This is not an adaptive map!
Definition at line 964 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
static |
Copy from a SG EpetraPolyOrthogVector object to an interlaced vector
Definition at line 982 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
static |
Copy from a SG EpetraPolyOrthogVector object to an interlaced vector
Definition at line 997 of file Stokhos_SGModelEvaluator_Interlaced.cpp.
|
protected |
Underlying model evaluator.
Definition at line 260 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Stochastic Galerkin basis.
Definition at line 263 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Stochastic Galerkin quadrature.
Definition at line 266 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Stochastic Galerkin expansion.
Definition at line 269 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Algorithmic parameters.
Definition at line 272 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Number of stochastic blocks.
Definition at line 275 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Number of W stochastic blocks (may be smaller than num_sg_blocks)
Definition at line 278 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Number of p stochastic blocks (may be smaller than num_sg_blocks)
Definition at line 281 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Whether we support x (and thus f and W)
Definition at line 284 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Underlying unknown map.
Definition at line 287 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Underlying residual map.
Definition at line 290 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Parallel SG data.
Definition at line 293 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Parallel SG communicator.
Definition at line 296 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Epetra Cijk.
Definition at line 299 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Serial Epetra Cijk for dgdx*.
Definition at line 302 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Map for stochastic blocks.
Definition at line 305 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Overlapped map for stochastic blocks (local map)
Definition at line 308 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Overlapped map for p stochastic blocks (local map)
Definition at line 311 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Block SG unknown map.
Definition at line 314 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Block SG overlapped unknown map.
Definition at line 317 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Block SG residual map.
Definition at line 320 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Block SG overlapped residual map.
Definition at line 323 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Importer from SG to SG-overlapped maps.
Definition at line 326 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Exporter from SG-overlapped to SG maps.
Definition at line 329 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Number of parameter vectors of underlying model evaluator.
Definition at line 332 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Number of stochastic parameter vectors.
Definition at line 335 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Index map between block-p and p_sg maps.
Definition at line 338 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Block SG parameter map.
Definition at line 341 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
SG coefficient parameter names.
Definition at line 344 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Number of response vectors of underlying model evaluator.
Definition at line 347 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Number of stochastic response vectors.
Definition at line 350 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Index map between block-g and g_sg maps.
Definition at line 353 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Block SG response map.
Definition at line 356 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
x_dot stochastic Galerkin components
Definition at line 359 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
x stochastic Galerkin components
Definition at line 362 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
mutableprotected |
f stochastic Galerkin components
Definition at line 365 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
mutableprotected |
W stochastic Galerkin components.
Definition at line 368 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
mutableprotected |
Definition at line 370 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
mutableprotected |
dg/dxdot stochastic Galerkin components
Definition at line 373 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
mutableprotected |
dg/dx stochastic Galerkin components
Definition at line 376 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
SG initial x.
Definition at line 379 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
SG initial p.
Definition at line 382 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Whether to always evaluate W with f.
Definition at line 385 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
mutableprotected |
W pointer for evaluating W with f.
Definition at line 388 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
mutableprotected |
x pointer for evaluating preconditioner
Definition at line 391 of file Stokhos_SGModelEvaluator_Interlaced.hpp.
|
protected |
Definition at line 393 of file Stokhos_SGModelEvaluator_Interlaced.hpp.