Elmer FEM solver
Elmer is an open source finite element software for multiphysical problems
|
Data Types | |
type | toreceive_t |
type | tosend_t |
Public Member Functions | |
subroutine | fetidirectsolver (A, x, b, Solver) |
type(matrix_t), pointer, save | bmat =>NULL() |
integer, dimension(:), allocatable | snd |
integer, dimension(:), allocatable | asize |
integer, dimension(:), allocatable | bsize |
integer, dimension(:), allocatable | cnt |
integer, dimension(:,:), allocatable | gbuf |
integer, dimension(:,:), allocatable | ibuf |
integer | ierr |
integer | me |
integer | abeg |
integer | bbeg |
integer, dimension(mpi_status_size) | status |
subroutine | fetisend (proc, nin, buf, ifg, tag) |
subroutine | fetirecv (proc, n, buf, ifg, tag) |
subroutine | fetigetneighbours () |
subroutine | fetisendreceiveinit (sndLC, gdofs, ldofs, procs, toSend, toReceive, tag) |
subroutine | fetisendreceive (toSend, toReceive, tag, Fsum) |
subroutine | fetisendrecvlc (A, f, b) |
subroutine | fetiadddtob (A, B, nLC) |
integer function | fetisendrecvif (A, f, b, g, l_i) |
subroutine | fetiproject (A, n, T, OP, TOL) |
subroutine | feticpg (A, n, x, b, f, Solver, matvecsubr, precsubr, dotprodfun, normfun) |
logical function | fetifloatingdomain (A, Solver, FixInds, TOL) |
subroutine | savekandf (A) |
subroutine | saver |
subroutine | saveb (A, ninterface, lint) |
subroutine | feti (A, x, b, Solver) |
subroutine | fetimv (u, v, ipar) |
subroutine | fetiprec (u, v, ipar) |
real(kind=dp) function | fetistopc (lx, lb, lr, ipar, dpar) |
subroutine fetisolve::feti | ( | type(matrix_t), pointer | A, |
real(kind=dp), dimension(:), target | x, | ||
real(kind=dp), dimension(:), target | b, | ||
type(solver_t) | Solver | ||
) |
The FETI main routine: solve x from Ax=b using the F(inite) E(lement) T(earing) and I(nterconnect) method.
References crsmatrix::crs_setsymmdirichlet(), directsolve::directsolver(), messages::fatal(), feticpg(), fetidirectsolver(), fetifloatingdomain(), fetigetneighbours(), fetimv(), fetiprec(), fetisendrecvif(), fetisendrecvlc(), defutils::getbc(), defutils::getboundaryelement(), defutils::getcreal(), defutils::getelementdofs(), defutils::getlogical(), defutils::getnofboundaryelements(), defutils::getsolverparams(), defutils::getstring(), messages::info(), itersolve::itersolver(), lists::listaddlogical(), lists::listcheckpresent(), lists::listgetlogical(), directsolve::mumpslocal_solvenullspace(), parallelutils::parallelactivebarrier(), parallelutils::parallelfinalize(), parallelutils::parallelreduction(), savekandf(), saver(), solver(), sparitercomm::spardotprod(), and sparitercomm::sparnorm().
Referenced by fetisolver().
subroutine fetisolve::fetiadddtob | ( | type(matrix_t) | A, |
type(matrix_t), pointer | B, | ||
integer | nLC | ||
) |
Add Dirichlet BCs to set of Lagrange coefficients described by the 'B' matrix (the total FETI scheme).
References defutils::activeboundaryelement(), defutils::getbc(), defutils::getboundaryelement(), defutils::getelementnofnodes(), defutils::getnofboundaryelements(), defutils::getreal(), defutils::getsolver(), solverutils::setmatrixelement(), and solver().
Referenced by fetisendrecvif().
subroutine fetisolve::feticpg | ( | type(matrix_t), pointer | A, |
integer | n, | ||
real(kind=dp), dimension(:) | x, | ||
real(kind=dp), dimension(:) | b, | ||
real(kind=dp), dimension(:) | f, | ||
type(solver_t) | Solver, | ||
external | matvecsubr, | ||
external | precsubr, | ||
real(kind=dp), external | dotprodfun, | ||
real(kind=dp), external | normfun | ||
) |
The C(onjugate) P(rojected) G(radient) iterative solver.
References fetiproject(), defutils::getconstreal(), defutils::getinteger(), defutils::getsolverparams(), and restart().
Referenced by feti().
subroutine fetisolve::fetidirectsolver | ( | type(matrix_t), pointer | A, |
real(kind=dp), dimension(:), target | x, | ||
real(kind=dp), dimension(:), target | b, | ||
type(solver_t) | Solver | ||
) |
Solve x from [A z^T; z 0] [x; ] = [b 0] or A x = b, depending on how the system is set up.
References directsolve::directsolver(), and solver().
Referenced by feti(), fetimv(), and fetistopc().
logical function fetisolve::fetifloatingdomain | ( | type(matrix_t), pointer | A, |
type(solver_t) | Solver, | ||
integer, dimension(:) | FixInds, | ||
real(kind=dp) | TOL | ||
) |
Compute null(A), return value is whether null(A) is nonempty.
References eigensolve::arpackeigensolve(), coordinatesystems::coordinatesystemdimension(), directsolve::directsolver(), meshutils::findrigidbodyfixingnodes(), defutils::getlogical(), defutils::getsolverparams(), lists::listaddconstreal(), lists::listaddstring(), lists::listcheckpresent(), lists::listgetnamespace(), lists::listsetnamespace(), solverutils::matrixvectormultiply(), and solver().
Referenced by feti().
subroutine fetisolve::fetigetneighbours | ( | ) |
subroutine fetisolve::fetimv | ( | real(kind=dp), dimension(huti_ndim) | u, |
real(kind=dp), dimension(huti_ndim) | v, | ||
integer, dimension(*) | ipar | ||
) |
Matrix-vector prod. for the L.C. equations: v_i = SUM_part(B_i A_i^-1 B_i^T u_i). Called from the CG iterator.
References fetidirectsolver(), fetisendrecvif(), fetisendrecvlc(), defutils::getmatrix(), defutils::getsolver(), and solver().
Referenced by feti(), and fetistopc().
subroutine fetisolve::fetiprec | ( | real(kind=dp), dimension(huti_ndim) | u, |
real(kind=dp), dimension(huti_ndim) | v, | ||
integer, dimension(*) | ipar | ||
) |
Peconditioning for feti: u_i = SUM_part(B_i A_i B_i^T v_i) (the m-v could be written for the interface dofs only...) Called from the CG iterator.
References fetisendrecvif(), fetisendrecvlc(), defutils::getmatrix(), and solverutils::matrixvectormultiply().
Referenced by feti().
subroutine fetisolve::fetiproject | ( | type(matrix_t) | A, |
integer | n, | ||
real(kind=dp), dimension(n) | T, | ||
integer | OP, | ||
real(kind=dp) | TOL | ||
) |
The projection of the vector T to the set of feasible solutions orthogonal to the null space of A, defined by the condition: z^T(f-B^T) (OP=0, 'z' a.k.a. 'R'). Also handle the initial guess and the final extraction of the L.C.'s related to the above condition (OP=1,2).
References addtogtg(), generalutils::allocatematrix(), directsolve::directsolver(), messages::fatal(), fcg(), fetisendrecvif(), elementutils::freematrix(), g(), defutils::getlogical(), defutils::getsolver(), defutils::getsolverparams(), gt(), listmatrix::list_tocrsmatrix(), lists::listgetinteger(), lists::listgetnamespace(), lists::listsetnamespace(), parallelutils::parallelactivebarrier(), and parallelutils::parallelreduction().
Referenced by feticpg(), and fetistopc().
subroutine fetisolve::fetirecv | ( | integer | proc, |
integer | n, | ||
real(kind=dp), dimension(:), optional | buf, | ||
integer, dimension(:), optional, allocatable | ifg, | ||
integer | tag | ||
) |
Receive given buffer from a neighbour, either 'tags' to 'ifg' (when initializing) or the interface values to 'buf', the id of the sender returned in 'proc':
References buf.
Referenced by fetisendreceive(), and fetisendreceiveinit().
subroutine fetisolve::fetisend | ( | integer | proc, |
integer | nin, | ||
real(kind=dp), dimension(:), optional | buf, | ||
integer, dimension(:), optional | ifg, | ||
integer, optional | tag | ||
) |
Send given buffer to given neighbour, either 'tags' in 'ifg' (when initializing) or the interface values in 'buf':
References buf.
Referenced by fetisendreceive(), and fetisendreceiveinit().
subroutine fetisolve::fetisendreceive | ( | type(tosend_t), dimension(:) | toSend, |
type(toreceive_t), dimension(:) | toReceive, | ||
integer | tag, | ||
real(kind=dp), dimension(:), optional | Fsum | ||
) |
The neighbour send/receive communication, after initializations.
References buf, fetirecv(), and fetisend().
Referenced by fetisendrecvif(), and fetisendrecvlc().
subroutine fetisolve::fetisendreceiveinit | ( | integer | sndLC, |
integer, dimension(:) | gdofs, | ||
integer, dimension(:) | ldofs, | ||
integer, dimension(:) | procs, | ||
type(tosend_t), dimension(:) | toSend, | ||
type(toreceive_t), dimension(:) | toReceive, | ||
integer | tag | ||
) |
First time communication with all neighbours where local addresses of global tags are identified:
References fetirecv(), fetisend(), sparitercomm::searchiaitem(), and generalutils::sorti().
Referenced by fetisendrecvif(), and fetisendrecvlc().
integer function fetisolve::fetisendrecvif | ( | type(matrix_t) | A, |
real(kind=dp), dimension(:) | f, | ||
real(kind=dp), dimension(:) | b, | ||
real(kind=dp), dimension(:,:), optional | g, | ||
integer, dimension(0:), optional | l_i | ||
) |
Extract interface values from partition vector b; send and receive to/from neighbours. Only 'owned' interface dofs placed to result vector f. At intialization also assemble the 'B' connectivity matrix. In effect f=Bb;.
References generalutils::allocatematrix(), fetiadddtob(), fetisendreceive(), fetisendreceiveinit(), elementutils::freematrix(), g(), listmatrix::list_tocrsmatrix(), saveb(), and solverutils::setmatrixelement().
Referenced by feti(), fetimv(), fetiprec(), fetiproject(), g(), and gtg().
subroutine fetisolve::fetisendrecvlc | ( | type(matrix_t) | A, |
real(kind=dp), dimension(:) | f, | ||
real(kind=dp), dimension(:) | b | ||
) |
Given local (owned L.C.'s) interface vector b, send and receive all partition interface L.C's to/from neighbours. Place result to partitionwise vector f. In effect f=B^Tb.
References fetisendreceive(), and fetisendreceiveinit().
Referenced by feti(), fetimv(), fetiprec(), fetistopc(), gt(), and gtg().
real(kind=dp) function fetisolve::fetistopc | ( | real(kind=dp), dimension(huti_ndim) | lx, |
real(kind=dp), dimension(huti_ndim) | lb, | ||
real(kind=dp), dimension(huti_ndim) | lr, | ||
integer, dimension(*) | ipar, | ||
real(kind=dp), dimension(*) | dpar | ||
) |
Stop condition for the iteration. Use ||Ax-b||/||b|| from the originating system. Called from the CG iterator.
References fetidirectsolver(), fetimv(), fetiproject(), fetisendrecvlc(), defutils::getmatrix(), defutils::getsolver(), parallelutils::parallelactivebarrier(), parallelutils::parallelmatrix(), parallelutils::parallelmatrixvector(), parallelutils::parallelnorm(), parallelutils::parallelupdatesolve(), and solver().
subroutine fetisolve::saveb | ( | type(matrix_t) | A, |
integer | ninterface, | ||
integer, dimension(:) | lint | ||
) |
References generalutils::i2s(), and parallelutils::parallelactivebarrier().
Referenced by fetisendrecvif().
subroutine fetisolve::savekandf | ( | type(matrix_t) | A) |
References generalutils::i2s().
Referenced by feti().
subroutine fetisolve::saver | ( | ) |
References generalutils::i2s().
Referenced by feti().
integer fetisolve::abeg |
integer, dimension(:), allocatable fetisolve::asize |
integer fetisolve::bbeg |
type(matrix_t), pointer, save fetisolve::bmat =>NULL() |
integer, dimension(:), allocatable fetisolve::bsize |
integer, dimension(:), allocatable fetisolve::cnt |
integer, dimension(:,:), allocatable fetisolve::gbuf |
integer, dimension(:,:), allocatable fetisolve::ibuf |
integer fetisolve::ierr |
integer fetisolve::me |
integer, dimension(:), allocatable fetisolve::snd |
integer, dimension(mpi_status_size) fetisolve::status |