#include <LOCA_Epetra_Interface_xyzt.H>
Public Member Functions | |
xyzt (const Teuchos::RCP< LOCA::Epetra::Interface::TimeDependent > &interface, const Epetra_MultiVector &splitMultiVec, const Teuchos::RCP< Epetra_RowMatrix > &splitJac, const Teuchos::RCP< EpetraExt::MultiComm > &globalComm, const Epetra_Vector &initialCondVec, double dt, Teuchos::ParameterList *precPrintParams=0, Teuchos::ParameterList *precLSParams=0) | |
Constructor. | |
virtual | ~xyzt () |
Destructor. | |
virtual bool | computeF (const Epetra_Vector &x, Epetra_Vector &F, const FillType fillFlag) |
NOX Interface function for computing the residual. | |
virtual bool | computeJacobian (const Epetra_Vector &x, Epetra_Operator &Jac) |
NOX Interface function for computing the Jacobian matrix. | |
virtual void | setParameters (const LOCA::ParameterVector ¶m) |
LOCA Interface function for setting the continuation parameter. | |
virtual void | printSolution (const Epetra_Vector &x_, double conParam) |
LOCA Interface function for printing the solution. | |
void | setFloquetFillFlag (bool fff) |
void | beginFloquetOperatorApplication (Epetra_Vector &v) |
void | finishFloquetOperatorApplication (Epetra_Vector &v) |
virtual EpetraExt::BlockVector & | getSolution () |
Accessor for the global solution BlockVector. | |
virtual EpetraExt::BlockCrsMatrix & | getJacobian () |
Accessor for the global BlockCrsMatrix. | |
virtual LOCA::Epetra::xyztPrec & | getPreconditioner () |
Accessor for the xyzt Preconditioner. | |
virtual void | throwError (const string &functionName, const string &errorMsg) const |
LOCA Interface exception handler. | |
Private Attributes | |
Teuchos::RCP < LOCA::Epetra::Interface::TimeDependent > | interface |
Pointer to interface for usual time-dependent problem. | |
Teuchos::RCP< Epetra_RowMatrix > | splitJac |
Pointer to split (spatial) Jacobian matrix. | |
Teuchos::RCP < EpetraExt::MultiComm > | globalComm |
Pointer to the global (full XYZT) communicator. | |
Epetra_Vector | splitVec |
Split (spatial) input vector. | |
Epetra_Vector | splitRes |
Split (spatial) residual vector. | |
Epetra_Vector | splitVecOld |
Split (spatial) input vector from previous step. | |
const Epetra_Vector | initialCondVec |
Split (spatial) vector with initial condition of transient runs. | |
EpetraExt::BlockCrsMatrix * | jacobian |
Pointer to global XYZT Jacobian matrix. | |
EpetraExt::BlockVector * | solution |
Pointer to global XYZT solution vector. | |
EpetraExt::BlockVector * | solutionOverlap |
Pointer to global XYZT solution overlap vector. | |
Epetra_Import * | overlapImporter |
Pointer to global XYZT solution overlap vector importer. | |
int | timeStepsOnTimeDomain |
Number of time steps computed on each time domain. | |
int | numTimeDomains |
Total number of time step domains. | |
int | timeDomain |
Time domain on current processor. | |
int | conStep |
Continuation step number (used in printing). | |
std::vector< std::vector< int > > * | rowStencil |
Stencil for each row of global XYZT Jacobian matrix. | |
std::vector< int > * | rowIndex |
Set of indices into global XYZT Jacobian matrix. | |
Teuchos::ParameterList * | precPrintParams |
Reference to parameter list for controlling output of Jacobian matrix right preconditioning steps. | |
Teuchos::ParameterList * | precLSParams |
Reference to parameter list for controlling solution of linear systems used in Jacobian matrix right preconditioning. | |
LOCA::Epetra::xyztPrec * | preconditioner |
Pointer to XYZT preconditioner operator. | |
Epetra_CrsMatrix * | splitJacCrs |
Pointer to split (spatial) Jacobian matrix in CRS matrix form. | |
Epetra_RowMatrix * | savedSplitMassForFloquet |
Pointer to split (spatial) mass matrix saved for Floquet operation. | |
bool | isCrsMatrix |
Flag indicating whether space matrix is Crs (determined by cast attempt). | |
bool | isPeriodic |
Flag indicating whether XYZT system is periodic. | |
bool | floquetFillFlag |
Flag indicating Jacobian fill needs to be altered for Floquet calcs. | |
double | dt |
Time step size for computing time derivative -- generalize later. |
Code that takes a standard NOX-LOCA problem interface for spatially-discretized problems, and creates a NOX-LOCA interface for space-time problems. This interface is called by multiple replicas of the spatially discretized problem for parallelism of the time domain. Each replica can also own one or more time steps. This interface assembles a single space-time system including the solution and residual BlockVectors and the Jacobian BlockCrsMatrix. This interface relies heavily on the EpetraExt_Block* classes.
Definition at line 106 of file LOCA_Epetra_Interface_xyzt.H.
LOCA::Epetra::Interface::xyzt::xyzt | ( | const Teuchos::RCP< LOCA::Epetra::Interface::TimeDependent > & | interface, | |
const Epetra_MultiVector & | splitMultiVec, | |||
const Teuchos::RCP< Epetra_RowMatrix > & | splitJac, | |||
const Teuchos::RCP< EpetraExt::MultiComm > & | globalComm, | |||
const Epetra_Vector & | initialCondVec, | |||
double | dt, | |||
Teuchos::ParameterList * | precPrintParams = 0 , |
|||
Teuchos::ParameterList * | precLSParams = 0 | |||
) |
Constructor.
The interface, vector, and matrix arguments are all for the spatially decomposed problem. The MultiMpiCOmm communicator gives this class the information needed to construct the space-time system.
Definition at line 47 of file LOCA_Epetra_Interface_xyzt.C.
References globalComm, isCrsMatrix, isPeriodic, jacobian, numTimeDomains, overlapImporter, precLSParams, preconditioner, precPrintParams, rowIndex, rowStencil, solution, solutionOverlap, splitJac, splitJacCrs, timeDomain, and timeStepsOnTimeDomain.
LOCA::Epetra::Interface::xyzt::~xyzt | ( | ) | [virtual] |
Destructor.
Definition at line 152 of file LOCA_Epetra_Interface_xyzt.C.
References jacobian, overlapImporter, rowIndex, rowStencil, solution, and solutionOverlap.
bool LOCA::Epetra::Interface::xyzt::computeF | ( | const Epetra_Vector & | x, | |
Epetra_Vector & | F, | |||
const FillType | fillFlag | |||
) | [virtual] |
NOX Interface function for computing the residual.
Computes F given the vector x. Returns true if computation was successful.
Implements NOX::Epetra::Interface::Required.
Definition at line 163 of file LOCA_Epetra_Interface_xyzt.C.
References dt, globalComm, initialCondVec, interface, isPeriodic, overlapImporter, rowIndex, solution, solutionOverlap, splitRes, splitVec, splitVecOld, timeDomain, and timeStepsOnTimeDomain.
bool LOCA::Epetra::Interface::xyzt::computeJacobian | ( | const Epetra_Vector & | x, | |
Epetra_Operator & | Jac | |||
) | [virtual] |
NOX Interface function for computing the Jacobian matrix.
Computes Jac given the vector x. Returns true if computation was successful.
Implements NOX::Epetra::Interface::Jacobian.
Definition at line 207 of file LOCA_Epetra_Interface_xyzt.C.
References dt, floquetFillFlag, globalComm, initialCondVec, interface, isPeriodic, jacobian, overlapImporter, rowIndex, solution, solutionOverlap, splitJac, splitRes, splitVec, splitVecOld, timeDomain, and timeStepsOnTimeDomain.
void LOCA::Epetra::Interface::xyzt::setParameters | ( | const LOCA::ParameterVector & | param | ) | [virtual] |
LOCA Interface function for setting the continuation parameter.
Implements LOCA::Epetra::Interface::Required.
Definition at line 255 of file LOCA_Epetra_Interface_xyzt.C.
References interface.
void LOCA::Epetra::Interface::xyzt::printSolution | ( | const Epetra_Vector & | x_, | |
double | conParam | |||
) | [virtual] |
LOCA Interface function for printing the solution.
Reimplemented from LOCA::Epetra::Interface::Required.
Definition at line 261 of file LOCA_Epetra_Interface_xyzt.C.
References conStep, globalComm, interface, numTimeDomains, rowIndex, solution, splitVec, timeDomain, and timeStepsOnTimeDomain.
void LOCA::Epetra::Interface::xyzt::setFloquetFillFlag | ( | bool | fff | ) |
Method to alert object that Jacobian fills need to be altered to compute operator for Floquet theory (monodromy operator)
Definition at line 281 of file LOCA_Epetra_Interface_xyzt.C.
References floquetFillFlag, isCrsMatrix, savedSplitMassForFloquet, and splitJac.
void LOCA::Epetra::Interface::xyzt::beginFloquetOperatorApplication | ( | Epetra_Vector & | v | ) |
Method to start the application of the monodromy matrix, which involves multiplication by one mass matrix block and
Definition at line 299 of file LOCA_Epetra_Interface_xyzt.C.
References isPeriodic, overlapImporter, savedSplitMassForFloquet, solution, solutionOverlap, splitVec, splitVecOld, and timeDomain.
void LOCA::Epetra::Interface::xyzt::finishFloquetOperatorApplication | ( | Epetra_Vector & | v | ) |
Method to start the application of the monodromy matrix, which involves multiplication by one mass matrix block and
Definition at line 326 of file LOCA_Epetra_Interface_xyzt.C.
References globalComm, numTimeDomains, solution, splitVec, and timeDomain.
EpetraExt::BlockVector & LOCA::Epetra::Interface::xyzt::getSolution | ( | ) | [virtual] |
Accessor for the global solution BlockVector.
Definition at line 343 of file LOCA_Epetra_Interface_xyzt.C.
References solution.
EpetraExt::BlockCrsMatrix & LOCA::Epetra::Interface::xyzt::getJacobian | ( | ) | [virtual] |
Accessor for the global BlockCrsMatrix.
Definition at line 349 of file LOCA_Epetra_Interface_xyzt.C.
References jacobian.
LOCA::Epetra::xyztPrec & LOCA::Epetra::Interface::xyzt::getPreconditioner | ( | ) | [virtual] |
Accessor for the xyzt Preconditioner.
Definition at line 355 of file LOCA_Epetra_Interface_xyzt.C.
References preconditioner.
void LOCA::Epetra::Interface::xyzt::throwError | ( | const string & | functionName, | |
const string & | errorMsg | |||
) | const [virtual] |
Teuchos::RCP<LOCA::Epetra::Interface::TimeDependent> LOCA::Epetra::Interface::xyzt::interface [private] |
Pointer to interface for usual time-dependent problem.
Definition at line 184 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by computeF(), computeJacobian(), printSolution(), and setParameters().
Teuchos::RCP<Epetra_RowMatrix> LOCA::Epetra::Interface::xyzt::splitJac [private] |
Pointer to split (spatial) Jacobian matrix.
Definition at line 187 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by computeJacobian(), setFloquetFillFlag(), and xyzt().
Teuchos::RCP<EpetraExt::MultiComm> LOCA::Epetra::Interface::xyzt::globalComm [private] |
Pointer to the global (full XYZT) communicator.
Definition at line 190 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by computeF(), computeJacobian(), finishFloquetOperatorApplication(), printSolution(), and xyzt().
Epetra_Vector LOCA::Epetra::Interface::xyzt::splitVec [private] |
Split (spatial) input vector.
Definition at line 193 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by beginFloquetOperatorApplication(), computeF(), computeJacobian(), finishFloquetOperatorApplication(), and printSolution().
Epetra_Vector LOCA::Epetra::Interface::xyzt::splitRes [private] |
Split (spatial) residual vector.
Definition at line 196 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by computeF(), and computeJacobian().
Epetra_Vector LOCA::Epetra::Interface::xyzt::splitVecOld [private] |
Split (spatial) input vector from previous step.
Definition at line 199 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by beginFloquetOperatorApplication(), computeF(), and computeJacobian().
const Epetra_Vector LOCA::Epetra::Interface::xyzt::initialCondVec [private] |
Split (spatial) vector with initial condition of transient runs.
Definition at line 202 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by computeF(), and computeJacobian().
EpetraExt::BlockCrsMatrix* LOCA::Epetra::Interface::xyzt::jacobian [private] |
Pointer to global XYZT Jacobian matrix.
Definition at line 205 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by computeJacobian(), getJacobian(), xyzt(), and ~xyzt().
EpetraExt::BlockVector* LOCA::Epetra::Interface::xyzt::solution [private] |
Pointer to global XYZT solution vector.
Definition at line 208 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by beginFloquetOperatorApplication(), computeF(), computeJacobian(), finishFloquetOperatorApplication(), getSolution(), printSolution(), xyzt(), and ~xyzt().
EpetraExt::BlockVector* LOCA::Epetra::Interface::xyzt::solutionOverlap [private] |
Pointer to global XYZT solution overlap vector.
Definition at line 211 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by beginFloquetOperatorApplication(), computeF(), computeJacobian(), xyzt(), and ~xyzt().
Epetra_Import* LOCA::Epetra::Interface::xyzt::overlapImporter [private] |
Pointer to global XYZT solution overlap vector importer.
Definition at line 214 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by beginFloquetOperatorApplication(), computeF(), computeJacobian(), xyzt(), and ~xyzt().
int LOCA::Epetra::Interface::xyzt::timeStepsOnTimeDomain [private] |
Number of time steps computed on each time domain.
Definition at line 217 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by computeF(), computeJacobian(), printSolution(), and xyzt().
int LOCA::Epetra::Interface::xyzt::numTimeDomains [private] |
Total number of time step domains.
Definition at line 220 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by finishFloquetOperatorApplication(), printSolution(), and xyzt().
int LOCA::Epetra::Interface::xyzt::timeDomain [private] |
Time domain on current processor.
Definition at line 223 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by beginFloquetOperatorApplication(), computeF(), computeJacobian(), finishFloquetOperatorApplication(), printSolution(), and xyzt().
int LOCA::Epetra::Interface::xyzt::conStep [private] |
Continuation step number (used in printing).
Definition at line 226 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by printSolution().
std::vector< std::vector<int> >* LOCA::Epetra::Interface::xyzt::rowStencil [private] |
Stencil for each row of global XYZT Jacobian matrix.
Used in creating global XYZT Jacobian matrix for different finite difference schemes.
Definition at line 234 of file LOCA_Epetra_Interface_xyzt.H.
std::vector<int>* LOCA::Epetra::Interface::xyzt::rowIndex [private] |
Set of indices into global XYZT Jacobian matrix.
Definition at line 237 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by computeF(), computeJacobian(), printSolution(), xyzt(), and ~xyzt().
Teuchos::ParameterList* LOCA::Epetra::Interface::xyzt::precPrintParams [private] |
Reference to parameter list for controlling output of Jacobian matrix right preconditioning steps.
Definition at line 243 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by xyzt().
Teuchos::ParameterList* LOCA::Epetra::Interface::xyzt::precLSParams [private] |
Reference to parameter list for controlling solution of linear systems used in Jacobian matrix right preconditioning.
Definition at line 249 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by xyzt().
Pointer to XYZT preconditioner operator.
Definition at line 252 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by getPreconditioner(), and xyzt().
Epetra_CrsMatrix* LOCA::Epetra::Interface::xyzt::splitJacCrs [private] |
Pointer to split (spatial) Jacobian matrix in CRS matrix form.
Definition at line 255 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by xyzt().
Epetra_RowMatrix* LOCA::Epetra::Interface::xyzt::savedSplitMassForFloquet [private] |
Pointer to split (spatial) mass matrix saved for Floquet operation.
Definition at line 258 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by beginFloquetOperatorApplication(), and setFloquetFillFlag().
bool LOCA::Epetra::Interface::xyzt::isCrsMatrix [private] |
Flag indicating whether space matrix is Crs (determined by cast attempt).
Definition at line 261 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by setFloquetFillFlag(), and xyzt().
bool LOCA::Epetra::Interface::xyzt::isPeriodic [private] |
Flag indicating whether XYZT system is periodic.
Definition at line 264 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by beginFloquetOperatorApplication(), computeF(), computeJacobian(), and xyzt().
bool LOCA::Epetra::Interface::xyzt::floquetFillFlag [private] |
Flag indicating Jacobian fill needs to be altered for Floquet calcs.
Definition at line 267 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by computeJacobian(), and setFloquetFillFlag().
double LOCA::Epetra::Interface::xyzt::dt [private] |
Time step size for computing time derivative -- generalize later.
Definition at line 270 of file LOCA_Epetra_Interface_xyzt.H.
Referenced by computeF(), and computeJacobian().