LinearProblem encapsulates all information needed to form a discrete linear problem. More...
Public Member Functions | |
| LinearProblem () | |
| Empty ctor. | |
| LinearProblem (const Mesh &mesh, const Expr &eqn, const Expr &bc, const Expr &test, const Expr &unk, const TSFExtended::VectorType< double > &vecType) | |
| Construct with a mesh, equation set, bcs, test and unknown funcs, and a vector type. | |
| LinearProblem (const Mesh &mesh, const Expr &eqn, const Expr &bc, const BlockArray &test, const BlockArray &unk) | |
| Construct with a mesh, equation set, bcs, and blocks of variables. | |
| LinearProblem (const Mesh &mesh, const Expr &eqn, const Expr &bc, const Expr &test, const Expr &unk, const Expr &unkParams, const Expr &unkParamVals, const TSFExtended::VectorType< double > &vecType) | |
| Construct with a mesh, equation set, bcs, test and unknown funcs, parameters, and a vector type. | |
| LinearProblem (const Mesh &mesh, const Expr &eqn, const Expr &bc, const BlockArray &test, const BlockArray &unk, const Expr &unkParams, const Expr &unkParamVals) | |
| Construct with a mesh, equation set, bcs, parameters, and blocks of variables. | |
| LinearProblem (const RCP< Assembler > &assembler) | |
| Expr | solve (const LinearSolver< double > &solver) const |
| Solve the problem using the specified solver algorithm. | |
| SolverState< double > | solve (const LinearSolver< double > &solver, Expr &soln) const |
| Solve the problem, writing the solution into the given function. | |
| Array< Vector< double > > | getRHS () const |
| Return the multivector on the right-hand side of the linear equation. | |
| Vector< double > | getSingleRHS () const |
| Return the vector on the right-hand side of the linear equation. | |
| LinearOperator< double > | getOperator () const |
| Return the operator on the left-hand side of the equation. | |
| const RCP< DOFMapBase > & | rowMap (int blockRow) const |
| Return the map from cells and functions to row indices. | |
| const RCP< DOFMapBase > & | colMap (int blockCol) const |
| Return the map from cells and functions to column indices. | |
| const Array< RCP < DiscreteSpace > > & | solnSpace () const |
| Return the discrete space in which solutions live. | |
| const RCP< Set< int > > & | bcRows (int blockRow) const |
| Return the set of row indices marked as essential boundary conditions. | |
| int | numBlockRows () const |
| Return the number of block rows in the problem. | |
| int | numBlockCols () const |
| Return the number of block cols in the problem. | |
| Vector< double > | convertToMonolithicVector (const Array< Vector< double > > &internalBlock, const Array< Vector< double > > &bcBlock) const |
| Convert from a BC-partitioned solution vector to a monolithic vector. | |
| Expr | formSolutionExpr (const Array< Vector< double > > &vec) const |
Static Public Member Functions | |
| static bool & | solveFailureIsFatal () |
| Flag indicating whether to stop on a solve failure. | |
| static bool & | dumpBadMatrix () |
| Flag indicating whether to write out the matrix and vector after a solve failure. | |
| static std::string & | badMatrixFilename () |
| Filename for dump of bad matrix. | |
| static std::string & | badVectorFilename () |
| Filename for dump of bad vector. | |
Private Attributes | |
| RCP< Assembler > | assembler_ |
| LinearOperator< double > | A_ |
| Array< Vector< double > > | rhs_ |
| Array< Array< string > > | names_ |
| LinearSolveDriver | solveDriver_ |
LinearProblem encapsulates all information needed to form a discrete linear problem.
Definition at line 48 of file SundanceLinearProblem.hpp.
| LinearProblem::LinearProblem | ( | ) |
| LinearProblem::LinearProblem | ( | const Mesh & | mesh, |
| const Expr & | eqn, | ||
| const Expr & | bc, | ||
| const Expr & | test, | ||
| const Expr & | unk, | ||
| const TSFExtended::VectorType< double > & | vecType | ||
| ) |
Construct with a mesh, equation set, bcs, test and unknown funcs, and a vector type.
Definition at line 70 of file SundanceLinearProblem.cpp.
References assembler_, Sundance::Expr::flattenSpectral(), lpCtorTimer(), names_, Sundance::Expr::size(), and Sundance::toString().
| LinearProblem::LinearProblem | ( | const Mesh & | mesh, |
| const Expr & | eqn, | ||
| const Expr & | bc, | ||
| const BlockArray & | test, | ||
| const BlockArray & | unk | ||
| ) |
Construct with a mesh, equation set, bcs, and blocks of variables.
Definition at line 159 of file SundanceLinearProblem.cpp.
References assembler_, lpCtorTimer(), names_, and Sundance::toString().
| LinearProblem::LinearProblem | ( | const Mesh & | mesh, |
| const Expr & | eqn, | ||
| const Expr & | bc, | ||
| const Expr & | test, | ||
| const Expr & | unk, | ||
| const Expr & | unkParams, | ||
| const Expr & | unkParamVals, | ||
| const TSFExtended::VectorType< double > & | vecType | ||
| ) |
Construct with a mesh, equation set, bcs, test and unknown funcs, parameters, and a vector type.
Definition at line 115 of file SundanceLinearProblem.cpp.
References assembler_, Sundance::Expr::flattenSpectral(), lpCtorTimer(), names_, Sundance::Expr::size(), and Sundance::toString().
| LinearProblem::LinearProblem | ( | const Mesh & | mesh, |
| const Expr & | eqn, | ||
| const Expr & | bc, | ||
| const BlockArray & | test, | ||
| const BlockArray & | unk, | ||
| const Expr & | unkParams, | ||
| const Expr & | unkParamVals | ||
| ) |
Construct with a mesh, equation set, bcs, parameters, and blocks of variables.
Definition at line 217 of file SundanceLinearProblem.cpp.
References assembler_, Sundance::Expr::flattenSpectral(), lpCtorTimer(), names_, and Sundance::toString().
| LinearProblem::LinearProblem | ( | const RCP< Assembler > & | assembler | ) |
Definition at line 273 of file SundanceLinearProblem.cpp.
References lpCtorTimer(), names_, and Teuchos::toString().
| static std::string& Sundance::LinearProblem::badMatrixFilename | ( | ) | [inline, static] |
Filename for dump of bad matrix.
Definition at line 138 of file SundanceLinearProblem.hpp.
| static std::string& Sundance::LinearProblem::badVectorFilename | ( | ) | [inline, static] |
Filename for dump of bad vector.
Definition at line 142 of file SundanceLinearProblem.hpp.
| const RCP< Set< int > > & LinearProblem::bcRows | ( | int | blockRow | ) | const |
Return the set of row indices marked as essential boundary conditions.
Definition at line 306 of file SundanceLinearProblem.cpp.
References assembler_.
| const RCP< DOFMapBase > & LinearProblem::colMap | ( | int | blockCol | ) | const |
Return the map from cells and functions to column indices.
Definition at line 297 of file SundanceLinearProblem.cpp.
References assembler_.
| Vector< double > LinearProblem::convertToMonolithicVector | ( | const Array< Vector< double > > & | internalBlock, |
| const Array< Vector< double > > & | bcBlock | ||
| ) | const |
Convert from a BC-partitioned solution vector to a monolithic vector.
Definition at line 390 of file SundanceLinearProblem.cpp.
References assembler_.
| static bool& Sundance::LinearProblem::dumpBadMatrix | ( | ) | [inline, static] |
Flag indicating whether to write out the matrix and vector after a solve failure.
Definition at line 134 of file SundanceLinearProblem.hpp.
Definition at line 395 of file SundanceLinearProblem.cpp.
References assembler_, Sundance::LinearSolveDriver::formSolutionExpr(), names_, solnSpace(), and solveDriver_.
| TSFExtended::LinearOperator< double > LinearProblem::getOperator | ( | ) | const |
Return the operator on the left-hand side of the equation.
Definition at line 325 of file SundanceLinearProblem.cpp.
References A_, assembler_, rhs_, and SUNDANCE_MSG1.
Referenced by TSFExtended::PCDPreconditionerFactory::createPreconditioner(), Sundance::LinearEigenproblem::getK(), Sundance::LinearEigenproblem::getM(), Sundance::LinearEigenproblem::LinearEigenproblem(), and Sundance::LinearEigenproblem::solve().
| Array< Vector< double > > LinearProblem::getRHS | ( | ) | const |
Return the multivector on the right-hand side of the linear equation.
Definition at line 315 of file SundanceLinearProblem.cpp.
References assembler_, rhs_, and SUNDANCE_MSG1.
Referenced by getSingleRHS().
| Vector<double> Sundance::LinearProblem::getSingleRHS | ( | ) | const [inline] |
Return the vector on the right-hand side of the linear equation.
Definition at line 92 of file SundanceLinearProblem.hpp.
References getRHS().
| int LinearProblem::numBlockCols | ( | ) | const |
Return the number of block cols in the problem.
Definition at line 313 of file SundanceLinearProblem.cpp.
References assembler_.
| int LinearProblem::numBlockRows | ( | ) | const |
Return the number of block rows in the problem.
Definition at line 310 of file SundanceLinearProblem.cpp.
References assembler_.
| const RCP< DOFMapBase > & LinearProblem::rowMap | ( | int | blockRow | ) | const |
Return the map from cells and functions to row indices.
Definition at line 293 of file SundanceLinearProblem.cpp.
References assembler_.
| const Array< RCP< DiscreteSpace > > & LinearProblem::solnSpace | ( | ) | const |
Return the discrete space in which solutions live.
Definition at line 301 of file SundanceLinearProblem.cpp.
References assembler_.
Referenced by formSolutionExpr(), Sundance::LinearEigenproblem::LinearEigenproblem(), and solve().
| Expr LinearProblem::solve | ( | const LinearSolver< double > & | solver | ) | const |
Solve the problem using the specified solver algorithm.
Definition at line 334 of file SundanceLinearProblem.cpp.
References A_, assembler_, names_, rhs_, solnSpace(), Sundance::LinearSolveDriver::solve(), solveDriver_, solveFailureIsFatal(), and SUNDANCE_MSG1.
Referenced by Sundance::LPTestBase::solve().
| SolverState< double > LinearProblem::solve | ( | const LinearSolver< double > & | solver, |
| Expr & | soln | ||
| ) | const |
Solve the problem, writing the solution into the given function.
Definition at line 366 of file SundanceLinearProblem.cpp.
References SUNDANCE_MSG1.
| static bool& Sundance::LinearProblem::solveFailureIsFatal | ( | ) | [inline, static] |
Flag indicating whether to stop on a solve failure.
Definition at line 128 of file SundanceLinearProblem.hpp.
Referenced by Sundance::LPTestBase::solve(), and solve().
LinearOperator<double> Sundance::LinearProblem::A_ [mutable, private] |
Definition at line 154 of file SundanceLinearProblem.hpp.
Referenced by getOperator(), and solve().
RCP<Assembler> Sundance::LinearProblem::assembler_ [private] |
Definition at line 151 of file SundanceLinearProblem.hpp.
Referenced by bcRows(), colMap(), convertToMonolithicVector(), formSolutionExpr(), getOperator(), getRHS(), LinearProblem(), numBlockCols(), numBlockRows(), rowMap(), solnSpace(), and solve().
Array<Array<string> > Sundance::LinearProblem::names_ [private] |
Definition at line 160 of file SundanceLinearProblem.hpp.
Referenced by formSolutionExpr(), LinearProblem(), and solve().
Array<Vector<double> > Sundance::LinearProblem::rhs_ [mutable, private] |
Definition at line 157 of file SundanceLinearProblem.hpp.
Referenced by getOperator(), getRHS(), and solve().
Definition at line 163 of file SundanceLinearProblem.hpp.
Referenced by formSolutionExpr(), and solve().