Panzer
Version of the Day
|
#include <Panzer_LinearObjFactory.hpp>
Classes | |
struct | Gather_Builder |
struct | GatherDomain_Builder |
struct | GatherOrientation_Builder |
struct | GatherTangent_Builder |
struct | Scatter_Builder |
struct | ScatterDirichlet_Builder |
Private Types | |
typedef PHX::TemplateManager < typename Traits::EvalTypes, panzer::CloneableEvaluator, PHX::EvaluatorDerived< _, Traits > > | Evaluator_TemplateManager |
Abstract factory that builds the linear algebra objects required for the assembly including the gather/scatter evaluator objects.
The interface for construction of the gather scatter is externally very simple, but in fact under the hood it is quite complex. The user of this factory object simply calls buildGather(const Teuchos::ParameterList & pl) const
, buildScatter(const Teuchos::ParameterList & pl) const
, or buildScatterDirichlet(const Teuchos::ParameterList & pl) const
.
To implement a version of this class an author must overide all the linear algebra construction functions. The new version should also call the base class version of buildGatherScatterEvaluators
in the constructor with a reference to itself passed in as an argument. This requires the new version of the class to implement the following functions
This builds the correct scatter/gather/scatter-dirichlet evaluator objects and returns them as a CloneableEvaluator
(These evaluators must overide the CloneableEvaluator::clone
function which takes a parameter list). The cloned evaluators will be the ones actually returned from the buildGather(const Teuchos::ParameterList & pl) const
, buildGatherDomain(const Teuchos::ParameterList & pl) const
, buildGatherOrientation(const Teuchos::ParameterList & pl) const
, buildScatter(const Teuchos::ParameterList & pl) const
, or buildScatterDirichlet(const Teuchos::ParameterList & pl) const
functions.
Definition at line 72 of file Panzer_LinearObjFactory.hpp.
|
private |
Definition at line 260 of file Panzer_LinearObjFactory.hpp.
|
inlinevirtual |
Definition at line 74 of file Panzer_LinearObjFactory.hpp.
|
inline |
This builds all the required evaluators. It is required to be called before the build[Gather,Scatter,ScatterDirichlet]
functions are called. This would typically be called by the inheriting class.
[in] | builder | Template class to build all required evaluators. The class has the following interface. |
Definition at line 340 of file Panzer_LinearObjFactory.hpp.
|
pure virtual |
Read in a vector from a file. Fill a particular vector in the linear object container.
[in] | identifier | Key for specifying which file(s) to read |
[in] | loc | Linear object container to fill with the vector |
[in] | id | Id for the field to be filled |
Implemented in panzer::BlockedTpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >, panzer::BlockedEpetraLinearObjFactory< Traits, LocalOrdinalT >, and panzer::TpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >.
|
pure virtual |
Write in a vector from a file. Fill a particular vector in the linear object container.
[in] | identifier | Key for specifying which file(s) to read |
[in] | loc | Linear object container to fill with the vector |
[in] | id | Id for the field to be filled |
Implemented in panzer::BlockedTpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >, panzer::BlockedEpetraLinearObjFactory< Traits, LocalOrdinalT >, and panzer::TpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >.
|
pure virtual |
Build a container with all the neccessary linear algebra objects. This is the non-ghosted version.
Implemented in panzer::BlockedTpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >, panzer::BlockedEpetraLinearObjFactory< Traits, LocalOrdinalT >, and panzer::TpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >.
|
pure virtual |
Build a container with all the neccessary linear algebra objects, purely on the single physics. This gives linear algebra objects that are relevant for a single physics solve. In many cases this is simply a call to buildLinearObjContainer however, in a few important cases (for instance in stochastic galerkin methods) this will return a container for a single instantiation of the physics. This is the non-ghosted version.
Implemented in panzer::BlockedTpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >, panzer::BlockedEpetraLinearObjFactory< Traits, LocalOrdinalT >, and panzer::TpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >.
|
pure virtual |
Build a container with all the neccessary linear algebra objects. This is the ghosted version.
Implemented in panzer::BlockedTpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >, panzer::BlockedEpetraLinearObjFactory< Traits, LocalOrdinalT >, and panzer::TpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >.
|
pure virtual |
Build a container with all the neccessary linear algebra objects, purely on the single physics. This gives linear algebra objects that are relevant for a single physics solve. In many cases this is simply a call to buildGhostedLinearObjContainer however, in a few important cases (for instance in stochastic galerkin methods) this will return a container for a single instantiation of the physics. This is the ghosted version.
Implemented in panzer::BlockedTpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >, panzer::BlockedEpetraLinearObjFactory< Traits, LocalOrdinalT >, and panzer::TpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >.
|
pure virtual |
Build a GlobalEvaluationDataContainer that handles all domain communication. This is used primarily for gather operations and hides the allocation and usage of the ghosted vector from the user.
Implemented in panzer::BlockedTpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >, panzer::BlockedEpetraLinearObjFactory< Traits, LocalOrdinalT >, and panzer::TpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Initialize container with a specific set of member values.
Implemented in panzer::BlockedEpetraLinearObjFactory< Traits, LocalOrdinalT >, panzer::TpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >, and panzer::BlockedTpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >.
|
pure virtual |
Initialize container with a specific set of member values.
Implemented in panzer::BlockedEpetraLinearObjFactory< Traits, LocalOrdinalT >, panzer::TpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >, and panzer::BlockedTpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >.
|
pure virtual |
Adjust the residual vector and Jacobian matrix (if they exist) for applied dirichlet conditions. The adjustment considers if a boundary condition was set globally and locally and based on that result adjust the ghosted matrix and residual vector so that when they are summed across processors they resulting Dirichlet condition is correct.
[in] | localBCRows | Linear object container uses the X vector to indicate locally set dirichlet conditions. The format is if an entry of the vector is nonzero then it was set as a dirichlet condition. |
[in] | globalBCRows | Linear object container uses the X vector to indicate globally set dirichlet conditions. The format is if an entry of the vector is nonzero then it was set as a dirichlet condition. |
[in,out] | ghostedObjs | Ghosted linear object container storing the residual and jacobian matrix for any boundary conditions set. The matrix will be modified by zeroing any rows that are set as nonzero in globalBCRows but zero in localBCRows (similarly for the vector). If a row is nonzero in both localBCRows and globalBCRows then those rows in both the matrix and the residual vector are devided by the corresponding entry in the globalBCRows . |
[in] | zeroVectorRows | Instead of preserving (and scaling) the vector rows, setting this to true will zero them instead. |
Implemented in panzer::BlockedTpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >, panzer::BlockedEpetraLinearObjFactory< Traits, LocalOrdinalT >, and panzer::TpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >.
|
pure virtual |
Adjust a vector by replacing selected rows with the value of the evaluated dirichlet conditions. This is handled through the standard container mechanism.
[in] | counter | Contains a counter vector (the "x" vector) indicating which rows contain dirichlet conditions by having a non zero entry. The dirichlet condition values are specified in the "f" vector. |
[in,out] | result | The vector to be modifed is the "f" vector. |
Implemented in panzer::BlockedTpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >, panzer::BlockedEpetraLinearObjFactory< Traits, LocalOrdinalT >, and panzer::TpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >.
|
pure virtual |
Acess to the MPI Comm used in constructing this LOF.
Implemented in panzer::BlockedTpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >, panzer::BlockedEpetraLinearObjFactory< Traits, LocalOrdinalT >, and panzer::TpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >.
|
inline |
Use preconstructed scatter evaluators.
Definition at line 219 of file Panzer_LinearObjFactory.hpp.
|
inline |
Use preconstructed gather evaluators.
Definition at line 224 of file Panzer_LinearObjFactory.hpp.
|
inline |
Use preconstructed gather evaluators.
Definition at line 229 of file Panzer_LinearObjFactory.hpp.
|
inline |
Use preconstructed gather evaluators.
Definition at line 234 of file Panzer_LinearObjFactory.hpp.
|
inline |
Use preconstructed gather evaluators.
Definition at line 239 of file Panzer_LinearObjFactory.hpp.
|
inline |
Use preconstructed dirichlet scatter evaluators.
Definition at line 244 of file Panzer_LinearObjFactory.hpp.
|
pure virtual |
Get the domain global indexer object associated with this factory.
Implemented in panzer::BlockedEpetraLinearObjFactory< Traits, LocalOrdinalT >, panzer::BlockedTpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >, and panzer::TpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >.
|
pure virtual |
Get the range global indexer object associated with this factory.
Implemented in panzer::BlockedEpetraLinearObjFactory< Traits, LocalOrdinalT >, panzer::BlockedTpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >, and panzer::TpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >.
|
inlinevirtual |
Reimplemented in panzer::BlockedTpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >, and panzer::TpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >.
Definition at line 253 of file Panzer_LinearObjFactory.hpp.
|
inlinevirtual |
Reimplemented in panzer::BlockedTpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >, and panzer::TpetraLinearObjFactory< Traits, ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT >.
Definition at line 254 of file Panzer_LinearObjFactory.hpp.
|
private |
Definition at line 263 of file Panzer_LinearObjFactory.hpp.
|
private |
Definition at line 264 of file Panzer_LinearObjFactory.hpp.
|
private |
Definition at line 265 of file Panzer_LinearObjFactory.hpp.
|
private |
Definition at line 266 of file Panzer_LinearObjFactory.hpp.
|
private |
Definition at line 267 of file Panzer_LinearObjFactory.hpp.
|
private |
Definition at line 268 of file Panzer_LinearObjFactory.hpp.