|
OOFEM 3.0
|
#include <petscsolver.h>
Additional Inherited Members | |
| Protected Attributes inherited from oofem::NumericalMethod | |
| Domain * | domain |
| Pointer to domain. | |
| EngngModel * | engngModel |
| Pointer to engineering model. | |
Implements the solution of linear system of equation in the form \(A\cdot x=b\) using solvers from PETSc library. Only works with the PETSc sparse matrix implementation.
Definition at line 52 of file petscsolver.h.
| oofem::PetscSolver::PetscSolver | ( | Domain * | d, |
| EngngModel * | m ) |
Constructor.
| d | Domain which solver belongs to. |
| m | Engineering model which solver belongs to. |
Definition at line 51 of file petscsolver.C.
References oofem::SparseLinearSystemNM::SparseLinearSystemNM().
|
virtual |
Definition at line 53 of file petscsolver.C.
|
inlineoverridevirtual |
Implements oofem::SparseLinearSystemNM.
Definition at line 75 of file petscsolver.h.
|
inlineoverridevirtual |
Implements oofem::SparseLinearSystemNM.
Definition at line 76 of file petscsolver.h.
References oofem::ST_Petsc.
|
inlineoverridevirtual |
Returns the recommended sparse matrix type for this solver.
Implements oofem::SparseLinearSystemNM.
Definition at line 77 of file petscsolver.h.
References oofem::SMT_PetscMtrx.
| ConvergedReason oofem::PetscSolver::petsc_solve | ( | PetscSparseMtrx & | A, |
| Vec | b, | ||
| Vec | x ) |
Solves the given linear system.
| A | Coefficient matrix. |
| b | Right hand side (PETSC Vec(tor)). |
| x | Solution array(PETSC Vec(tor)). |
Definition at line 91 of file petscsolver.C.
References oofem::CR_CONVERGED, oofem::CR_DIVERGED_ITS, oofem::NumericalMethod::engngModel, oofem::Timer::getUtime(), oofem::PetscSparseMtrx::giveMtrx(), oofem::PetscSparseMtrx::ksp, oofem::PetscSparseMtrx::kspInit, oofem::macroScale, oofem::PetscSparseMtrx::newValues, OOFEM_ERROR, OOFEM_LOG_INFO, OOFEM_WARNING, oofem::Timer::startTimer(), and oofem::Timer::stopTimer().
Referenced by solve().
|
overridevirtual |
Solves the given sparse linear system of equations \( A\cdot x=b \).
| A | Coefficient matrix. |
| b | Right hand side. |
| x | Solution array. |
Implements oofem::SparseLinearSystemNM.
Definition at line 55 of file petscsolver.C.
References oofem::PetscSparseMtrx::createVecGlobal(), oofem::FloatArray::giveSize(), OOFEM_ERROR, petsc_solve(), oofem::FloatArray::resize(), oofem::PetscSparseMtrx::scatterG2L(), and oofem::PetscSparseMtrx::scatterL2G().