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

Data Types

interface  allocatearray
 
interface  allocatevector
 
interface  componentname
 

Public Member Functions

subroutine startadvanceoutput (SolverName, OutputType)
 
subroutine advanceoutput (t, n, dot_t, percent_t)
 
pure function lentrim (str)
 
pure function i2s (VALUE)
 
subroutine systemcommand (cmd)
 
pure function filenamequalified (file)
 
pure function littleendian ()
 
character(len=20) function formatdate ()
 
subroutine sort (n, a)
 
subroutine sorti (n, a, b)
 
subroutine sortf (n, a, b)
 
subroutine sortd (n, a, b)
 
subroutine sortc (n, a, b)
 
subroutine sortr (n, a, b)
 
integer function searchi (N, Array, Val)
 
integer function searchr (N, Array, Val)
 
subroutine openincludefile (Unit, FileName, IncludePath)
 
recursive function readandtrim (Unit, str, echo, literal)
 
character(len=var%namelen) function getvarname (Var)
 
character(len=max_name_len)
function 
componentnamevar (Var, Component)
 
character(len=max_name_len)
function 
componentnamestr (BaseName, Component_arg)
 
subroutine solvetridiag (n, y, h, r)
 
subroutine cubicspline (n, x, y, r)
 
real(kind=dp) function cubicsplineval (x, y, r, t)
 
real(kind=dp) function cubicsplinedval (x, y, r, t)
 
real(kind=dp) function interpolatecurve (TValues, FValues, T, CubicCoeff)
 
real(kind=dp) function derivatecurve (TValues, FValues, T, CubicCoeff)
 
subroutine solvelinsys2x2 (A, x, b)
 
subroutine solvelinsys3x3 (A, x, b)
 
subroutine clearmatrix (Matrix)
 
type(matrix_t) function, pointer allocatematrix ()
 
recursive subroutine freequadranttree (Root)
 
subroutine allocaterealvector (F, n, From, FailureMessage)
 
subroutine allocatecomplexvector (f, n, From, FailureMessage)
 
subroutine allocateintegervector (f, n, From, FailureMessage)
 
subroutine allocatelogicalvector (f, n, From, FailureMessage)
 
subroutine allocateelementvector (f, n, From, FailureMessage)
 
subroutine allocaterealarray (f, n1, n2, From, FailureMessage)
 
subroutine allocatecomplexarray (f, n1, n2, From, FailureMessage)
 
subroutine allocateintegerarray (f, n1, n2, From, FailureMessage)
 
subroutine allocatelogicalarray (f, n1, n2, From, FailureMessage)
 
character(len=max_name_len)
function 
nextfreefilename (Filename0, Suffix0, LastExisting)
 
real(kind=dp) function normalrandom ()
 
real(kind=dp) function evenrandom ()
 
subroutine forceload
 

Member Function/Subroutine Documentation

subroutine generalutils::advanceoutput ( integer  t,
integer  n,
real(kind=dp), optional  dot_t,
real(kind=dp), optional  percent_t 
)

References messages::info().

Referenced by bulkassembly(), flowsolver(), heatsolver(), helmholtzsolver(), kesolver(), komega(), stokessolver(), and v2f_ldm().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine generalutils::allocatecomplexarray ( complex(kind=dp), dimension(:,:), pointer  f,
integer  n1,
integer  n2,
character(len=*), optional  From,
character(len=*), optional  FailureMessage 
)

References messages::error(), and messages::fatal().

Here is the call graph for this function:

subroutine generalutils::allocatecomplexvector ( complex(kind=dp), dimension(:), pointer  f,
integer  n,
character(len=*), optional  From,
character(len=*), optional  FailureMessage 
)

References messages::error(), and messages::fatal().

Here is the call graph for this function:

subroutine generalutils::allocateelementvector ( type(element_t), dimension(:), pointer  f,
integer  n,
character(len=*), optional  From,
character(len=*), optional  FailureMessage 
)

References messages::error(), and messages::fatal().

Here is the call graph for this function:

subroutine generalutils::allocateintegerarray ( integer, dimension(:,:), pointer  f,
integer  n1,
integer  n2,
character(len=*), optional  From,
character(len=*), optional  FailureMessage 
)

References messages::error(), and messages::fatal().

Here is the call graph for this function:

subroutine generalutils::allocateintegervector ( integer, dimension(:), pointer  f,
integer  n,
character(len=*), optional  From,
character(len=*), optional  FailureMessage 
)

References messages::error(), and messages::fatal().

Here is the call graph for this function:

subroutine generalutils::allocatelogicalarray ( logical, dimension(:,:), pointer  f,
integer  n1,
integer  n2,
character(len=*), optional  From,
character(len=*), optional  FailureMessage 
)

References messages::error(), and messages::fatal().

Here is the call graph for this function:

subroutine generalutils::allocatelogicalvector ( logical, dimension(:), pointer  f,
integer  n,
character(len=*), optional  From,
character(len=*), optional  FailureMessage 
)

References messages::error(), and messages::fatal().

Here is the call graph for this function:

subroutine generalutils::allocaterealarray ( real(kind=dp), dimension(:,:), pointer  f,
integer  n1,
integer  n2,
character(len=*), optional  From,
character(len=*), optional  FailureMessage 
)

References messages::error(), and messages::fatal().

Here is the call graph for this function:

subroutine generalutils::allocaterealvector ( real(kind=dp), dimension(:), pointer  F,
integer  n,
character(len=*), optional  From,
character(len=*), optional  FailureMessage 
)

References messages::error(), and messages::fatal().

Here is the call graph for this function:

subroutine generalutils::clearmatrix ( type(matrix_t), pointer  Matrix)

Referenced by allocatematrix(), and blocksolve::blockinitmatrix().

Here is the caller graph for this function:

character(len=max_name_len) function generalutils::componentnamestr ( character(len=*)  BaseName,
integer, optional  Component_arg 
)

References messages::fatal(), and i2s().

Here is the call graph for this function:

character(len=max_name_len) function generalutils::componentnamevar ( type(variable_t), intent(in)  Var,
integer, intent(in), optional  Component 
)

References i2s().

Here is the call graph for this function:

subroutine generalutils::cubicspline ( integer  n,
real(kind=dp), dimension(:)  x,
real(kind=dp), dimension(:)  y,
real(kind=dp), dimension(:)  r 
)

Solver for the coefficients of a cubic spline.

References solvetridiag().

Referenced by lists::listadddepreal(), localmatrix(), and magnetodynamicscalcfields().

Here is the call graph for this function:

Here is the caller graph for this function:

real(kind=dp) function generalutils::cubicsplinedval ( real(kind=dp), dimension(:)  x,
real(kind=dp), dimension(:)  y,
real(kind=dp), dimension(:)  r,
real(kind=dp)  t 
)

Referenced by derivatecurve().

Here is the caller graph for this function:

real(kind=dp) function generalutils::cubicsplineval ( real(kind=dp), dimension(:)  x,
real(kind=dp), dimension(:)  y,
real(kind=dp), dimension(:)  r,
real(kind=dp)  t 
)

Evalulate a cubic spline.

Referenced by interpolatecurve().

Here is the caller graph for this function:

real(kind=dp) function generalutils::derivatecurve ( real(kind=dp), dimension(:)  TValues,
real(kind=dp), dimension(:)  FValues,
real(kind=dp)  T,
real(kind=dp), dimension(:), optional, pointer  CubicCoeff 
)

Derivate a curve given by linear table or splines.

References cubicsplinedval().

Referenced by lists::listgetderivvalue(), and localmatrix().

Here is the call graph for this function:

Here is the caller graph for this function:

real(kind=dp) function generalutils::evenrandom ( )

Returns values from a even distribution [0,1].

Referenced by particleutils::initializeparticles(), particlescattering(), and particleutils::randompointinelement().

Here is the caller graph for this function:

pure function generalutils::filenamequalified ( character(*), intent(in)  file)

Referenced by modeldescription::loadincludefile(), modeldescription::loadrestartfile(), savedependence(), saveline(), modeldescription::saveresult(), savescalars(), savetopost(), vtuoutputsolver(), and modeldescription::writepostfile().

Here is the caller graph for this function:

subroutine generalutils::forceload ( )
character( len=20 ) function generalutils::formatdate ( )

Referenced by elmerpostoutputsolver(), saveline(), modeldescription::saveresult(), savescalars(), solver(), vtklegacyfile::writegrid(), dxfile::writegrid(), and modeldescription::writepostfile().

Here is the caller graph for this function:

recursive subroutine generalutils::freequadranttree ( type(quadrant_t), pointer  Root)

Referenced by particletracker(), meshutils::periodicprojector(), meshutils::pointinmesh(), meshutils::releasemesh(), and structuredflowline().

Here is the caller graph for this function:

character(len=var % namelen) function generalutils::getvarname ( type(variable_t)  Var)
real(kind=dp) function generalutils::interpolatecurve ( real(kind=dp), dimension(:)  TValues,
real(kind=dp), dimension(:)  FValues,
real(kind=dp)  T,
real(kind=dp), dimension(:), optional, pointer  CubicCoeff 
)

Interpolate values in a curve given by linear table or splines.

References cubicsplineval().

Referenced by lists::listgetfun(), lists::listgetreal(), lists::listgetrealarray(), lists::listgetrealatip(), localmatrix(), and magnetodynamicscalcfields().

Here is the call graph for this function:

Here is the caller graph for this function:

pure function generalutils::lentrim ( character(len=*), intent(in)  str)
pure function generalutils::littleendian ( )

Referenced by writepvdfile(), writepvtifile(), writepvtufile(), writevtifile(), and writevtufile().

Here is the caller graph for this function:

character(len=max_name_len) function generalutils::nextfreefilename ( character(len=max_name_len)  Filename0,
character(len=max_name_len), optional  Suffix0,
logical, optional  LastExisting 
)

Given the filename0 (and suffix0) find the 1st free filename that does not exist in the current working directory.

Referenced by gmshoutputsolver(), savedependence(), saveline(), savescalars(), and savetopost().

Here is the caller graph for this function:

real(kind=dp) function generalutils::normalrandom ( )

Returns values from a normal distribution to be used in thermal velocity distribution, for example.

subroutine generalutils::openincludefile ( integer  Unit,
character(len=*)  FileName,
character(len=*)  IncludePath 
)

Referenced by readandtrim().

Here is the caller graph for this function:

recursive function generalutils::readandtrim ( integer  Unit,
character(len=*), allocatable  str,
logical, optional  echo,
logical, optional  literal 
)

Read a (logical) line from FORTRAN device Unit and remove leading, trailing, and multiple blanks between words. Also convert uppercase characters to lowercase.The logical line can continue the several physical lines by adding the backslash () mark at the end of a physical line.

References messages::fatal(), and openincludefile().

Referenced by checkkeyword(), elementdescription::initializeelementdescriptions(), modeldescription::loadinputfile(), modeldescription::loadrestartfile(), meshutils::readelementpropertyfile(), readtime(), sectioncontents(), and modeldescription::writepostfile().

Here is the call graph for this function:

Here is the caller graph for this function:

integer function generalutils::searchi ( integer  N,
integer, dimension(:)  Array,
integer  Val 
)

Search an integer value in an ordered array.

References idx().

Here is the call graph for this function:

integer function generalutils::searchr ( integer  N,
real(kind=dp), dimension(:)  Array,
real(kind=dp)  Val 
)

Search a real value in an ordered array.

References idx().

Here is the call graph for this function:

subroutine generalutils::solvelinsys2x2 ( real(kind=dp), dimension(:,:)  A,
real(kind=dp), dimension(:)  x,
real(kind=dp), dimension(:)  b 
)

Solves a 2 x 2 linear system.

References messages::error().

Referenced by elementdescription::globaltolocal(), defutils::solvelinsys(), and solvelinsys3x3().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine generalutils::solvelinsys3x3 ( real(kind=dp), dimension(:,:)  A,
real(kind=dp), dimension(:)  x,
real(kind=dp), dimension(:)  b 
)

Solves a 3 x 3 linear system.

References g(), and solvelinsys2x2().

Referenced by elementdescription::globaltolocal(), and defutils::solvelinsys().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine generalutils::solvetridiag ( integer  n,
real(kind=dp), dimension(:)  y,
real(kind=dp), dimension(:)  h,
real(kind=dp), dimension(:)  r 
)

Solves a tridiagonal linear system.

Referenced by cubicspline().

Here is the caller graph for this function:

subroutine generalutils::sort ( integer  n,
integer, dimension(:)  a 
)

Sort an array of integer values.

subroutine generalutils::sortc ( integer  n,
complex(kind=dp), dimension(:)  a,
integer, dimension(:)  b 
)

Sort an complex array, and organize an index table accordingly.

Referenced by eigensolve::arpackdampedeigensolve(), eigensolve::arpackeigensolve(), eigensolve::arpackeigensolvecomplex(), eigensolve::arpackstabeigensolve(), and paralleleigensolve::parallelarpackeigensolve().

Here is the caller graph for this function:

subroutine generalutils::sortd ( integer  n,
real(kind=dp), dimension(:)  a,
integer, dimension(:)  b 
)

Sort an real array, and change the order of an index array accordingly.

subroutine generalutils::sortf ( integer  n,
integer, dimension(:)  a,
real(kind=dp), dimension(:)  b 
)

Sort an index array, and change the order of an real array accordingly.

Referenced by crsmatrix::crs_complexdiagprecondition(), crsmatrix::crs_diagprecondition(), crsmatrix::crs_sortbasicmatrix(), crsmatrix::crs_sortmatrix(), crs_sortmatrixvalues(), forcecompute(), and interpolatef2cdistance().

Here is the caller graph for this function:

subroutine generalutils::sorti ( integer  n,
integer, dimension(:)  a,
integer, dimension(:)  b 
)

Sort an interger array a, together with an another integer array.

Referenced by sparitersolve::continuousnumbering(), crs_sortmatrixvalues(), fetisolve::fetisendreceiveinit(), matrixbandwidthoptimize(), renumber(), sparitercomm::sparedgenumbering(), sparitercomm::sparfacenumbering(), sparitercomm::sparglobalnumbering(), and sparitersolve::splitmatrix().

Here is the caller graph for this function:

subroutine generalutils::sortr ( integer  n,
integer, dimension(:)  a,
real(kind=dp), dimension(:)  b 
)

Order real components in b in a decreasing order and return the new order of indexes in a.

Referenced by meshutils::clusternodesbydirection(), cmgbonds(), cmgclusterform(), computeintegrals(), distcomp(), projecttoplane(), radiationfactors(), and particleutils::segmentelementintersection().

Here is the caller graph for this function:

subroutine generalutils::startadvanceoutput ( character(len=*)  SolverName,
character(len=*)  OutputType 
)

References messages::info().

Referenced by bulkassembly(), flowsolver(), heatsolver(), helmholtzsolver(), kesolver(), komega(), and v2f_ldm().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine generalutils::systemcommand ( character(len=*)  cmd)

Referenced by radiationfactors(), and remesh().

Here is the caller graph for this function:


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