Elmer FEM solver
Elmer is an open source finite element software for multiphysical problems
 All Classes Files Functions Variables Typedefs Macros Groups Pages
blocksolve Module Reference

Public Attributes

type(blockmatrix_t), pointer, save totmatrix
 
type(variable_t) function, pointer createblockvariable (Solver, VariableNo, VarName, ExtDofs, ExtPerm)
 
subroutine blockinitmatrix (Solver, BlockMatrix, BlockDofs)
 
subroutine blockpickmatrix (Solver, NoVar)
 
subroutine blockprecmatrix (Solver, NoVar)
 
subroutine blockupdaterhs (BlockMatrix, ThisRow)
 
subroutine blockmatrixvectorprod (u, v, ipar)
 
subroutine blockmatrixprec (u, v, ipar)
 
subroutine blockstandarditer (Solver, MaxChange)
 
subroutine blockkryloviter (Solver, MaxChange)
 
subroutine blocksolveint (A, x, b, Solver)
 

Member Function/Subroutine Documentation

subroutine blocksolve::blockinitmatrix ( type(solver_t), target  Solver,
type(blockmatrix_t), pointer  BlockMatrix,
integer  BlockDofs 
)

This subroutine initializes the block matrix structure so that the matrices and vectors have a natural location to save.

References generalutils::allocatematrix(), generalutils::clearmatrix(), createblockvariable(), messages::fatal(), messages::info(), lists::listgetintegerarray(), lists::listgetstring(), solver(), and lists::variableget().

Referenced by blocksolveint(), and mainutils::blocksolver().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine blocksolve::blockkryloviter ( type(solver_t)  Solver,
real(kind=dp)  MaxChange 
)

This call takes care of the iterative Krylov methods for block systems which can still be preconditioned by block Jacobi or Gauss-Seidel methods.

References blockmatrixprec(), blockmatrixvectorprod(), itersolve::itersolver(), lists::listaddlogical(), lists::listgetnamespace(), lists::listsetnamespace(), parallelutils::parallelinitsolve(), parallelutils::parallelupdateresult(), solver(), sparitercomm::spardotprod(), and sparitercomm::sparnorm().

Referenced by blocksolveint(), and mainutils::blocksolver().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine blocksolve::blockmatrixprec ( real(kind=dp), dimension(*), target  u,
real(kind=dp), dimension(*), target  v,
integer, dimension(*)  ipar 
)

Perform block preconditioning by solving all the individual diagonal problems. Has to be called outside the module by Krylov methods.

References crsmatrix::crs_copymatrixprec(), crsmatrix::crs_matrixvectormultiply(), generalutils::i2s(), messages::info(), itersolve::itersolver(), lists::listaddlogical(), lists::listgetintegerarray(), lists::listgetlogical(), lists::listgetnamespace(), lists::listsetnamespace(), parallelutils::parallelmatrixvector(), solver(), solverutils::solvesystem(), sparitercomm::spardotprod(), sparitersolve::sparmatrixvector(), and sparitercomm::sparnorm().

Referenced by blockkryloviter().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine blocksolve::blockmatrixvectorprod ( real(kind=dp), dimension(*)  u,
real(kind=dp), dimension(*)  v,
integer, dimension(*)  ipar 
)

Perform matrix-vector product for block matrices. Has to be callable outside the module by Krylov methods.

References crsmatrix::crs_matrixvectormultiply(), and parallelutils::parallelmatrixvector().

Referenced by blockkryloviter().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine blocksolve::blockpickmatrix ( type(solver_t)  Solver,
integer  NoVar 
)

Picks the components of a full matrix to the submatrices of a block matrix. On choice, the user may have exactly the same block matrix structure than a leading component.

References crsmatrix::crs_blockmatrixpick(), crsmatrix::crs_blockmatrixpick2(), crsmatrix::crs_copymatrixtopology(), lists::listgetlogical(), and solver().

Referenced by blocksolveint(), and mainutils::blocksolver().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine blocksolve::blockprecmatrix ( type(solver_t)  Solver,
integer  NoVar 
)

The block preconditioning matrix need not be directly derived from the full matrix. Some or all the components may also be derived from a basic operator such as the Laplacian.

References crsmatrix::crs_copymatrixtopology(), messages::info(), solverutils::laplacematrixassembly(), lists::listgetcreal(), solverutils::massmatrixassembly(), and solver().

Referenced by blocksolveint(), and mainutils::blocksolver().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine blocksolve::blocksolveint ( type(matrix_t), pointer  A,
real(kind=dp), dimension(:)  x,
real(kind=dp), dimension(:)  b,
type(solver_t), target  Solver 
)

An alternative handle for the block solvers to be used by the legacy matrix type.

References blockinitmatrix(), blockkryloviter(), blockpickmatrix(), blockprecmatrix(), blockstandarditer(), messages::info(), lists::listgetlogical(), lists::listgetnamespace(), lists::listsetnamespace(), parallelutils::parallelactive(), parallelutils::parallelinitmatrix(), and solver().

Referenced by blocksolveext().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine blocksolve::blockstandarditer ( type(solver_t)  Solver,
real(kind=dp)  MaxChange 
)

This call takes care of Jacobi & Gauss Seidel block methods.

References blockupdaterhs(), crsmatrix::crs_copymatrixprec(), generalutils::i2s(), messages::info(), lists::listaddlogical(), lists::listgetconstreal(), lists::listgetinteger(), lists::listgetintegerarray(), lists::listgetlogical(), lists::listsetnamespace(), solver(), and solverutils::solvesystem().

Referenced by blocksolveint(), and mainutils::blocksolver().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine blocksolve::blockupdaterhs ( type(blockmatrix_t), target  BlockMatrix,
integer, optional  ThisRow 
)

Compute the rhs for the block matrix system which is solved accounting only the diagonal entries i.e. subtract the non-diagonal matrix-vector results from the original r.h.s. vectors. After this the block diagonal problem Ax=b may be solved.

References crsmatrix::crs_matrixvectormultiply(), and messages::info().

Referenced by blockstandarditer().

Here is the call graph for this function:

Here is the caller graph for this function:

type(variable_t) function, pointer blocksolve::createblockvariable ( type(solver_t), pointer  Solver,
integer  VariableNo,
character(len=max_name_len)  VarName,
integer, optional  ExtDofs,
integer, dimension(:), optional, pointer  ExtPerm 
)

If a block variable does not exist it will be created. Here only normal nodal elements are supported for the moment. Then also the creation of permutation vector is straight-forward. Note that no reordering is currently performed.

There is limitation regarding non-nodal elements which stems partly from the fact that an elementtype is solver specific while this one solver could have a number of different elementtypes for different equations.

References messages::fatal(), defutils::getelementdofs(), generalutils::i2s(), messages::info(), lists::listgetinteger(), lists::listgetintegerarray(), lists::listgetlogical(), solver(), lists::variableaddvector(), and lists::variableget().

Referenced by blockinitmatrix(), and mainutils::coupledsolver().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

type(blockmatrix_t), pointer, save blocksolve::totmatrix

The documentation for this module was generated from the following file: