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

Public Member Functions

subroutine checksolveroptions (Solver)
 
subroutine addsolverprocedure (Solver, PROCEDURE)
 
subroutine addequationbasics (Solver, Name, Transient)
 
subroutine addequationsolution (Solver, Transient)
 
subroutine solveequations (Model, dt, TransientSimulation, CoupledMinIter, CoupledMaxIter, SteadyStateReached, RealTimestep)
 
subroutine blocksystemassembly (Solver, dt, Transient, RowVar, ColVar, RowIndOffset, ColIndOffset)
 
subroutine coupledsolver (Model, Solver, dt, Transient)
 
subroutine blocksolver (Model, Solver, dt, Transient)
 
subroutine singlesolver (Model, Solver, dt, TransientSimulation)
 
subroutine solveractivate (Model, Solver, dt, TransientSimulation)
 

Member Function/Subroutine Documentation

subroutine mainutils::addequationbasics ( type(solver_t), pointer  Solver,
character(len=*)  Name,
logical  Transient 
)

Add the generic stuff related to each Solver. A few solvers are for historical reasons given a special treatment.

References lists::checkelementequation(), checksolveroptions(), coordinatesystems::coordinatesystemdimension(), elementutils::creatematrix(), coordinatesystems::currentcoordinatesystem(), messages::fatal(), flowsolver(), elementutils::freematrix(), modeldescription::getprocaddr(), heatsolver(), lists::listaddinteger(), lists::listaddlogical(), lists::listaddstring(), lists::listcheckpresent(), lists::listgetinteger(), lists::listgetlogical(), lists::listgetstring(), magneticsolver(), meshsolver(), lists::nextfreekeyword(), radiationfactors(), solver(), stresssolver(), lists::variableadd(), lists::variableget(), and messages::warn().

Referenced by addsolvers(), resulttopost(), and resulttoresult().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine mainutils::addequationsolution ( type(solver_t), pointer  Solver,
logical  Transient 
)

Add information that is typically only needed if there's a matrix equation to work with. This should be called only after both the solution vector and matrix have been created.

References messages::fatal(), generalutils::getvarname(), lists::listaddinteger(), lists::listaddlogical(), lists::listcheckpresent(), lists::listgetconstrealarray(), lists::listgetinteger(), lists::listgetlogical(), lists::listgetstring(), meshutils::meshstabparams(), parallelutils::parallelinitmatrix(), savematrix(), meshutils::setcurrentmesh(), solver(), meshutils::splitmeshequal(), meshutils::updatesolvermesh(), lists::variableadd(), lists::variableaddvector(), lists::variableget(), and messages::warn().

Referenced by addsolvers(), blocksolver(), coupledsolver(), resulttopost(), and resulttoresult().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine mainutils::addsolverprocedure ( type(solver_t)  Solver,
integer, external  PROCEDURE 
)

Get calling address of the procedure and add it to the Solver structure.

References solver().

Here is the call graph for this function:

subroutine mainutils::blocksolver ( type(model_t)  Model,
type(solver_t), target  Solver,
real(kind=dp)  dt,
logical  Transient 
)

This is a line of solvers where a matrix is matrices and a vector of vectors are created to allow different kinds of block strategies for the solvers. This strategy has optimal memory consumption even if block strategies are employed on the linear system level.

References addequationsolution(), solverutils::backscalelinearsystem(), blocksolve::blockinitmatrix(), blocksolve::blockkryloviter(), blocksolve::blockpickmatrix(), blocksolve::blockprecmatrix(), blocksolve::blockstandarditer(), blocksystemassembly(), blocksystemdirichlet(), checkstepsizeblock(), defutils::defaultfinishassembly(), defutils::defaultsolve(), messages::fatal(), defutils::getcreal(), defutils::getinteger(), defutils::getlogical(), generalutils::i2s(), messages::info(), solverutils::initializetozero(), listmatrix::list_tocrsmatrix(), lists::listaddinteger(), lists::listaddlogical(), lists::listaddstring(), lists::listcheckpresent(), lists::listgetinteger(), lists::listgetlogical(), lists::listgetnamespace(), lists::listremove(), lists::listsetnamespace(), parallelutils::parallelactive(), parallelutils::parallelinitmatrix(), solverutils::scalelinearsystem(), singlesolver(), and solver().

Referenced by solveractivate().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine mainutils::blocksystemassembly ( type(solver_t), pointer  Solver,
real(kind=dp)  dt,
logical  Transient,
integer  RowVar,
integer  ColVar,
integer, optional  RowIndOffset,
integer, optional  ColIndOffset 
)

Perform assembly for the block system linear system of equations.

References messages::fatal(), defutils::getelementdofs(), defutils::getelementnofnodes(), modeldescription::getprocaddr(), solverutils::gluelocalsubmatrix(), messages::info(), lists::listaddinteger(), lists::listgetlogical(), lists::listgetstring(), solver(), lists::variableget(), and messages::warn().

Referenced by blocksolver(), and coupledsolver().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine mainutils::checksolveroptions ( type(solver_t)  Solver)

Routine checks the feasibility of solver options.

References messages::fatal(), messages::info(), lists::listaddstring(), lists::listgetstring(), and solver().

Referenced by addequationbasics().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine mainutils::coupledsolver ( type(model_t)  Model,
type(solver_t), target  Solver,
real(kind=dp)  dt,
logical  Transient 
)

This is a line of monolithic solvers where different physics and constraints are assemblied to the same matrix. Provide assembly loop and solution of linear and nonlinear systems This routine uses minimalistic assmebly routines to create the matrices. Often the results to less labour in coding which may be comprimized by less flexibility.

References addequationsolution(), generalutils::allocatematrix(), blocksystemassembly(), solverutils::checkstepsize(), coupledconstraintassembly(), coupledsystemdirichlet(), coupledtosinglevector(), blocksolve::createblockvariable(), defutils::defaultdirichletbcs(), defutils::defaultfinishassembly(), defutils::defaultinitialize(), defutils::defaultsolve(), messages::fatal(), defutils::getcreal(), defutils::getinteger(), defutils::getmatrix(), defutils::getmesh(), defutils::getsolverparams(), messages::info(), listmatrix::list_tocrsmatrix(), lists::listaddinteger(), lists::listaddlogical(), lists::listaddstring(), lists::listcheckpresent(), lists::listgetinteger(), lists::listgetlogical(), lists::listgetstring(), lists::listremove(), singlesolver(), singletocoupledvector(), solver(), lists::variableadd(), lists::variableget(), and messages::warn().

Referenced by solveractivate().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine mainutils::singlesolver ( type(model_t)  Model,
type(solver_t), pointer  Solver,
real(kind=dp)  dt,
logical  TransientSimulation 
)

This executes the original line of solvers (legacy solvers) where each solver includes looping over elements and the convergence control. From generality point of view this misses some opportunities to have control of the nonlinear system.

References solverutils::calculatenodalweights(), lists::checkelementequation(), lists::listaddinteger(), lists::listgetlogical(), lists::listgetstring(), parallelutils::parallelactive(), parallelutils::parallelinitmatrix(), and solver().

Referenced by blocksolver(), coupledsolver(), and solveractivate().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine mainutils::solveequations ( type(model_t)  Model,
real(kind=dp)  dt,
logical  TransientSimulation,
integer  CoupledMinIter,
integer  CoupledMaxIter,
logical  SteadyStateReached,
integer, optional  RealTimestep 
)

Solve the equations one-by-one.

References solverutils::computenorm(), solverutils::initializetimestep(), lists::listgetlogical(), lists::listgetstring(), parallelutils::parallelbarrier(), solvecoupled(), solver(), solveractivate(), and lists::variableget().

Referenced by execsimulation().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine mainutils::solveractivate ( type(model_t)  Model,
type(solver_t), pointer  Solver,
real(kind=dp)  dt,
logical  TransientSimulation 
)

Runs a solver as defined in the command file. There are several ways how to skip the execution. The are also three different ways how the metrices may be assmebled and solver: standard (single), coupled and block.

References meshutils::backcoordinatetransformation(), blocksolver(), meshutils::coordinatetransformation(), coupledsolver(), solverutils::getpassiveboundary(), messages::info(), lists::listaddconstreal(), lists::listcheckpresent(), lists::listgetconstreal(), lists::listgetcreal(), lists::listgetintegerarray(), lists::listgetlogical(), lists::listgetstring(), lists::listsetnamespace(), meshutils::setcurrentmesh(), singlesolver(), solver(), and lists::variableget().

Referenced by elmersolver(), execsimulation(), solvecoupled(), and solveequations().

Here is the call graph for this function:

Here is the caller graph for this function:


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