Elmer FEM solver
Elmer is an open source finite element software for multiphysical problems
|
Public Member Functions | |
subroutine | initializetimestep (Solver) |
recursive subroutine | solvesystem (A, ParA, b, x, Norm, DOFs, Solver) |
subroutine | solveeigensystem (StiffMatrix, NOFEigen, EigenValues, EigenVectors, Solver) |
subroutine | variablenameparser (var_name, NoOutput, Global, Dofs) |
subroutine | condensate (N, K, F, F1) |
subroutine | condensatep (N, Nb, K, F, F1) |
subroutine | solveharmonicsystem (G, Solver) |
subroutine | linearsystemmultiply (Solver) |
subroutine | initializetimestep (Solver) |
recursive subroutine | solvesystem (A, ParA, b, x, Norm, DOFs, Solver) |
subroutine | solveeigensystem (StiffMatrix, NOFEigen, EigenValues, EigenVectors, Solver) |
subroutine | variablenameparser (var_name, NoOutput, Global, Dofs) |
subroutine | condensate (N, K, F, F1) |
subroutine | condensatep (N, Nb, K, F, F1) |
subroutine | solveharmonicsystem (G, Solver) |
subroutine | linearsystemmultiply (Solver) |
subroutine | initializetozero (A, ForceVector) |
subroutine | setmatrixelement (A, i, j, VALUE) |
real(kind=dp) function | getmatrixelement (A, i, j) |
real(kind=dp) function | changematrixelement (A, i, j, NewValue) |
subroutine | addtomatrixelement (A, i, j, VALUE) |
subroutine | movematrixelement (A, i1, j1, i2, j2) |
subroutine | zerorow (A, n) |
subroutine | moverow (A, n1, n2, Coeff) |
subroutine | gluelocalsubmatrix (A, row0, col0, Nrow, Ncol, RowInds, ColInds, RowDofs, ColDofs, LocalMatrix) |
subroutine | matrixvectormultiply (A, u, v) |
subroutine | transposematrixvectormultiply (A, u, v) |
subroutine | copybulkmatrix (A) |
subroutine | getpassiveboundary (Model, Mesh, BcId) |
logical function | checkpassiveelement (UElement) |
subroutine | add1stordertime (MassMatrix, StiffMatrix, Force, dt, n, DOFs, NodeIndexes, Solver, UElement) |
subroutine | add1stordertime_crs (Matrix, Force, dt, Solver) |
subroutine | add2ndordertime (MassMatrix, DampMatrix, StiffMatrix, Force, dt, n, DOFs, NodeIndexes, Solver) |
subroutine | updatetimeforce (StiffMatrix, ForceVector, LocalForce, n, NDOFs, NodeIndexes) |
subroutine | updateglobalequations (StiffMatrix, LocalStiffMatrix, ForceVector, LocalForce, n, NDOFs, NodeIndexes, RotateNT, UElement) |
subroutine | updateglobalforce (ForceVector, LocalForce, n, NDOFs, NodeIndexes, RotateNT, UElement) |
subroutine | updatemassmatrix (StiffMatrix, LocalMassMatrix, n, NDOFs, NodeIndexes) |
subroutine | determinesoftlimiter (Solver) |
subroutine | setdirichletboundaries (Model, A, b, Name, DOF, NDOFs, Perm, PermOffSet, OffDiagonalMatrix) |
subroutine | setdirichletpoint (StiffMatrix, ForceVector, DOF, NDOFs, Perm, NodeIndex, NodeValue) |
subroutine | setnodalloads (Model, A, b, Name, DOF, NDOFs, Perm) |
integer function | sgetelementdofs (Indexes, UElement, USolver) |
subroutine | checknormaltangentialboundary (Model, VariableName, NumberOfBoundaryNodes, BoundaryReorder, BoundaryNormals, BoundaryTangent1, BoundaryTangent2, dim) |
subroutine | averageboundarynormals (Model, VariableName, NumberOfBoundaryNodes, BoundaryReorder, BoundaryNormals, BoundaryTangent1, BoundaryTangent2, dim) |
integer function | searchnodel (ParallelInfo, QueriedNode, n) |
subroutine | finishassembly (Solver, ForceVector) |
recursive subroutine | invalidatevariable (TopMesh, PrimaryMesh, Name) |
subroutine | rotatentsystem (Vec, NodeNumber) |
subroutine | backrotatentsystem (Solution, Perm, NDOFs) |
logical function | getsolutionrotation (A, n) |
real(kind=dp) function | computenorm (Solver, nin, values) |
subroutine | computechange (Solver, SteadyState, nsize, values, values0) |
logical function | checkstepsize (Solver, FirstTrial, PrevResidual, Residual, nsize, values, values0) |
subroutine | calculatenodalweights (Solver, WeightAtBoundary, Perm, VarName) |
subroutine | scalelinearsystem (Solver, A, b, x, DiagScaling, ApplyScaling, RhsScaling, ConstraintScaling) |
subroutine | rowequilibration (A, f, Parallel) |
subroutine | backscalelinearsystem (Solver, A, b, x, DiagScaling, ConstraintScaling) |
subroutine | reverserowequilibration (A, f) |
recursive subroutine | solvelinearsystem (A, b, x, Norm, DOFs, Solver, BulkMatrix) |
subroutine | updateexportedvariables (Solver) |
subroutine | nscondensate (N, Nb, dim, K, F, F1) |
subroutine | solvewithlinearrestriction (StiffMatrix, ForceVector, Solution, Norm, DOFs, Solver) |
subroutine | laplacematrixassembly (Solver, Perm, A) |
subroutine | massmatrixassembly (Solver, Perm, A) |
subroutine | mortarrobinsolver (A, x, b, Solver) |
subroutine | fct_correction (Solver) |
subroutine | initializetozero (A, ForceVector) |
subroutine | setmatrixelement (A, i, j, VALUE) |
real(kind=dp) function | getmatrixelement (A, i, j) |
real(kind=dp) function | changematrixelement (A, i, j, NewValue) |
subroutine | addtomatrixelement (A, i, j, VALUE) |
subroutine | movematrixelement (A, i1, j1, i2, j2) |
subroutine | zerorow (A, n) |
subroutine | moverow (A, n1, n2, Coeff) |
subroutine | gluelocalsubmatrix (A, row0, col0, Nrow, Ncol, RowInds, ColInds, RowDofs, ColDofs, LocalMatrix) |
subroutine | matrixvectormultiply (A, u, v) |
subroutine | transposematrixvectormultiply (A, u, v) |
subroutine | getpassiveboundary (Model, Mesh, BcId) |
logical function | checkpassiveelement (UElement) |
subroutine | add1stordertime (MassMatrix, StiffMatrix, Force, dt, n, DOFs, NodeIndexes, Solver, UElement) |
subroutine | add1stordertime_crs (Matrix, Force, dt, Solver) |
subroutine | add2ndordertime (MassMatrix, DampMatrix, StiffMatrix, Force, dt, n, DOFs, NodeIndexes, Solver) |
subroutine | updatetimeforce (StiffMatrix, ForceVector, LocalForce, n, NDOFs, NodeIndexes) |
subroutine | updateglobalequations (StiffMatrix, LocalStiffMatrix, ForceVector, LocalForce, n, NDOFs, NodeIndexes, RotateNT, UElement) |
subroutine | updateglobalforce (ForceVector, LocalForce, n, NDOFs, NodeIndexes, RotateNT, UElement) |
subroutine | updatemassmatrix (StiffMatrix, LocalMassMatrix, n, NDOFs, NodeIndexes) |
subroutine | determinesoftlimiter (Solver) |
subroutine | setdirichletboundaries (Model, A, b, Name, DOF, NDOFs, Perm, PermOffSet, OffDiagonalMatrix) |
subroutine | setdirichletpoint (StiffMatrix, ForceVector, DOF, NDOFs, Perm, NodeIndex, NodeValue) |
subroutine | setnodalloads (Model, A, b, Name, DOF, NDOFs, Perm) |
integer function | sgetelementdofs (Indexes, UElement, USolver) |
subroutine | checknormaltangentialboundary (Model, VariableName, NumberOfBoundaryNodes, BoundaryReorder, BoundaryNormals, BoundaryTangent1, BoundaryTangent2, dim) |
subroutine | averageboundarynormals (Model, VariableName, NumberOfBoundaryNodes, BoundaryReorder, BoundaryNormals, BoundaryTangent1, BoundaryTangent2, dim) |
integer function | searchnodel (ParallelInfo, QueriedNode, n) |
subroutine | finishassembly (Solver, ForceVector) |
recursive subroutine | invalidatevariable (TopMesh, PrimaryMesh, Name) |
subroutine | rotatentsystem (Vec, NodeNumber) |
subroutine | backrotatentsystem (Solution, Perm, NDOFs) |
logical function | getsolutionrotation (A, n) |
real(kind=dp) function | computenorm (Solver, nin, values) |
subroutine | computechange (Solver, SteadyState, nsize, values, values0) |
logical function | checkstepsize (Solver, FirstTrial, PrevResidual, Residual, nsize, values, values0) |
subroutine | calculatenodalweights (Solver, WeightAtBoundary, Perm, VarName) |
subroutine | scalelinearsystem (Solver, A, b, x, DiagScaling, ApplyScaling, RhsScaling, ConstraintScaling) |
subroutine | rowequilibration (A, f, Parallel) |
subroutine | backscalelinearsystem (Solver, A, b, x, DiagScaling, ConstraintScaling) |
subroutine | reverserowequilibration (A, f) |
recursive subroutine | solvelinearsystem (A, b, x, Norm, DOFs, Solver, BulkMatrix) |
subroutine | updateexportedvariables (Solver) |
subroutine | nscondensate (N, Nb, dim, K, F, F1) |
subroutine | solvewithlinearrestriction (StiffMatrix, ForceVector, Solution, Norm, DOFs, Solver) |
subroutine | laplacematrixassembly (Solver, Perm, A) |
subroutine | massmatrixassembly (Solver, Perm, A) |
subroutine | mortarrobinsolver (A, x, b, Solver) |
subroutine | fct_correction (Solver) |
subroutine solverutils::add1stordertime | ( | real(kind=dp), dimension(:,:) | MassMatrix, |
real(kind=dp), dimension(:,:) | StiffMatrix, | ||
real(kind=dp), dimension(:) | Force, | ||
real(kind=dp) | dt, | ||
integer | n, | ||
integer | DOFs, | ||
integer, dimension(:) | NodeIndexes, | ||
type(solver_t) | Solver, | ||
type(element_t), optional, target | UElement | ||
) |
For time dependent simulations add the time derivative coefficient terms to the local matrix containing other coefficients.
massmatrix | Local mass matrix. |
stiffmatrix | Local stiffness matrix. |
force | Local right-hand-side vector. |
dt | Simulation timestep size |
n | number of element nodes |
dofs | variable degrees of freedom |
nodeindexes | element nodes |
solver | Solver structure. |
uelement | Element structure |
References timeintegrate::bdflocal(), timeintegrate::fractionalstep(), lists::listgetstring(), timeintegrate::newmarkbeta(), solver(), updateglobalforce(), lists::variableget(), and timeintegrate::vbdflocal().
Referenced by advectiondiffusionsolver(), defutils::default1stordertimec(), defutils::default1stordertimer(), diffusegrayradiation(), magneticw1solver(), outletcompute(), and phasechangesolve().
subroutine solverutils::add1stordertime | ( | real(kind=dp), dimension(:,:) | MassMatrix, |
real(kind=dp), dimension(:,:) | StiffMatrix, | ||
real(kind=dp), dimension(:) | Force, | ||
real(kind=dp) | dt, | ||
integer | n, | ||
integer | DOFs, | ||
integer, dimension(:) | NodeIndexes, | ||
type(solver_t) | Solver, | ||
type(element_t), optional, target | UElement | ||
) |
For time dependent simulations add the time derivative coefficient terms to the local matrix containing other coefficients.
massmatrix | Local mass matrix. |
stiffmatrix | Local stiffness matrix. |
force | Local right-hand-side vector. |
dt | Simulation timestep size |
n | number of element nodes |
dofs | variable degrees of freedom |
nodeindexes | element nodes |
solver | Solver structure. |
uelement | Element structure |
References timeintegrate::bdflocal(), timeintegrate::fractionalstep(), lists::listgetstring(), timeintegrate::newmarkbeta(), solver(), updateglobalforce(), lists::variableget(), and timeintegrate::vbdflocal().
subroutine solverutils::add1stordertime_crs | ( | type(matrix_t), pointer | Matrix, |
real(kind=dp), dimension(:) | Force, | ||
real(kind=dp) | dt, | ||
type(solver_t) | Solver | ||
) |
For time dependent simulations add the time derivative coefficient terms to the global matrix containing other coefficients.
matrix | Global matrix (including stiffness and mass) |
force | Global right-hand-side vector. |
dt | Simulation timestep size |
solver | Solver structure. |
References timeintegrate::bdf_crs(), timeintegrate::fractionalstep_crs(), messages::info(), lists::listgetstring(), timeintegrate::newmarkbeta_crs(), solver(), lists::variableget(), and timeintegrate::vbdf_crs().
subroutine solverutils::add1stordertime_crs | ( | type(matrix_t), pointer | Matrix, |
real(kind=dp), dimension(:) | Force, | ||
real(kind=dp) | dt, | ||
type(solver_t) | Solver | ||
) |
For time dependent simulations add the time derivative coefficient terms to the global matrix containing other coefficients.
matrix | Global matrix (including stiffness and mass) |
force | Global right-hand-side vector. |
dt | Simulation timestep size |
solver | Solver structure. |
References timeintegrate::bdf_crs(), messages::info(), lists::listgetstring(), timeintegrate::newmarkbeta_crs(), solver(), lists::variableget(), and timeintegrate::vbdf_crs().
Referenced by defutils::default1stordertimeglobal().
subroutine solverutils::add2ndordertime | ( | real(kind=dp), dimension(:,:) | MassMatrix, |
real(kind=dp), dimension(:,:) | DampMatrix, | ||
real(kind=dp), dimension(:,:) | StiffMatrix, | ||
real(kind=dp), dimension(:) | Force, | ||
real(kind=dp) | dt, | ||
integer | n, | ||
integer | DOFs, | ||
integer, dimension(:) | NodeIndexes, | ||
type(solver_t) | Solver | ||
) |
For time dependent simulations add the time derivative coefficient terms to the matrix containing other coefficients.
massmatrix | Local mass matrix. |
dampmatrix | Local damping matrix. |
stiffmatrix | Local stiffness matrix. |
force | Local right-hand-side vector. |
dt | Simulation timestep size |
n | number of element nodes |
dofs | variable degrees of freedom |
nodeindexes | element nodes |
solver | Solver structure. |
References timeintegrate::bossak2ndorder(), lists::listgetstring(), solver(), and updateglobalforce().
Referenced by defutils::default2ndordertimec(), and defutils::default2ndordertimer().
subroutine solverutils::add2ndordertime | ( | real(kind=dp), dimension(:,:) | MassMatrix, |
real(kind=dp), dimension(:,:) | DampMatrix, | ||
real(kind=dp), dimension(:,:) | StiffMatrix, | ||
real(kind=dp), dimension(:) | Force, | ||
real(kind=dp) | dt, | ||
integer | n, | ||
integer | DOFs, | ||
integer, dimension(:) | NodeIndexes, | ||
type(solver_t) | Solver | ||
) |
For time dependent simulations add the time derivative coefficient terms to the matrix containing other coefficients.
massmatrix | Local mass matrix. |
dampmatrix | Local damping matrix. |
stiffmatrix | Local stiffness matrix. |
force | Local right-hand-side vector. |
dt | Simulation timestep size |
n | number of element nodes |
dofs | variable degrees of freedom |
nodeindexes | element nodes |
solver | Solver structure. |
References timeintegrate::bossak2ndorder(), lists::listgetstring(), solver(), and updateglobalforce().
subroutine solverutils::addtomatrixelement | ( | type(matrix_t) | A, |
integer | i, | ||
integer | j, | ||
real(kind=dp) | VALUE | ||
) |
Adds to the value of a given matrix element.
References bandmatrix::band_addtomatrixelement(), crsmatrix::crs_addtomatrixelement(), listmatrix::list_addtomatrixelement(), and listmatrix::list_tolistmatrix().
Referenced by addheatgap(), addtogtg(), coupledconstraintassembly(), diffusegrayradiation(), integconns(), magnetodynamics2dharmonic(), movematrixelement(), setperiodicboundariespass1(), setperiodicboundariespass2(), solvewithlinearrestriction(), and streamsolver().
subroutine solverutils::addtomatrixelement | ( | type(matrix_t) | A, |
integer | i, | ||
integer | j, | ||
real(kind=dp) | VALUE | ||
) |
Adds to the value of a given matrix element.
References bandmatrix::band_addtomatrixelement(), crsmatrix::crs_addtomatrixelement(), listmatrix::list_addtomatrixelement(), and listmatrix::list_tolistmatrix().
subroutine solverutils::averageboundarynormals | ( | type(model_t) | Model, |
character(len=*) | VariableName, | ||
integer | NumberOfBoundaryNodes, | ||
integer, dimension(:), pointer | BoundaryReorder, | ||
real(kind=dp), dimension(:,:), pointer | BoundaryNormals, | ||
real(kind=dp), dimension(:,:), pointer | BoundaryTangent1, | ||
real(kind=dp), dimension(:,:), pointer | BoundaryTangent2, | ||
integer | dim | ||
) |
Average boundary normals for nodes. The average boundary normals may be beneficial as they provide more continuous definition of normal over curved boundaries.
References coordinatesystems::coordinatesystemdimension(), integmassconsistent(), lists::listgetconstrealarray(), lists::listgetlogical(), lists::listgetreal(), elementdescription::normalvector(), searchnodel(), elementutils::tangentdirections(), and lists::variableget().
subroutine solverutils::averageboundarynormals | ( | type(model_t) | Model, |
character(len=*) | VariableName, | ||
integer | NumberOfBoundaryNodes, | ||
integer, dimension(:), pointer | BoundaryReorder, | ||
real(kind=dp), dimension(:,:), pointer | BoundaryNormals, | ||
real(kind=dp), dimension(:,:), pointer | BoundaryTangent1, | ||
real(kind=dp), dimension(:,:), pointer | BoundaryTangent2, | ||
integer | dim | ||
) |
Average boundary normals for nodes. The average boundary normals may be beneficial as they provide more continuous definition of normal over curved boundaries.
References coordinatesystems::coordinatesystemdimension(), integmassconsistent(), lists::listgetconstrealarray(), lists::listgetlogical(), lists::listgetreal(), elementdescription::normalvector(), searchnodel(), elementutils::tangentdirections(), and lists::variableget().
Referenced by initializetozero().
subroutine solverutils::backrotatentsystem | ( | real(kind=dp), dimension(:) | Solution, |
integer, dimension(:) | Perm, | ||
integer | NDOFs | ||
) |
Backrotate a solution from normal-tangential coordinate system to cartesian one.
References coordinatesystems::coordinatesystemdimension().
Referenced by computevarloads(), solvelinearsystem(), and stokessolver().
subroutine solverutils::backrotatentsystem | ( | real(kind=dp), dimension(:) | Solution, |
integer, dimension(:) | Perm, | ||
integer | NDOFs | ||
) |
Backrotate a solution from normal-tangential coordinate system to cartesian one.
References coordinatesystems::coordinatesystemdimension().
subroutine solverutils::backscalelinearsystem | ( | type(solver_t) | Solver, |
type(matrix_t) | A, | ||
real(kind=dp), dimension(:), optional | b, | ||
real(kind=dp), dimension(:), optional | x, | ||
real(kind=dp), dimension(:), optional, target | DiagScaling, | ||
logical, optional | ConstraintScaling | ||
) |
Scale the system back to original.
References messages::fatal(), and solver().
Referenced by mainutils::blocksolver(), defutils::defaultdirichletbcs(), solvelinearsystem(), and stokessolver().
subroutine solverutils::backscalelinearsystem | ( | type(solver_t) | Solver, |
type(matrix_t) | A, | ||
real(kind=dp), dimension(:), optional | b, | ||
real(kind=dp), dimension(:), optional | x, | ||
real(kind=dp), dimension(:), optional, target | DiagScaling, | ||
logical, optional | ConstraintScaling | ||
) |
Scale the system back to original.
References messages::fatal(), and solver().
subroutine solverutils::calculatenodalweights | ( | type(solver_t) | Solver, |
logical | WeightAtBoundary, | ||
integer, dimension(:), optional, pointer | Perm, | ||
character(*), optional | VarName | ||
) |
Computing nodal weight may be good when one needs to transform nodal information back to continuous fields by dividing with the nodal weight. Active either for the permutation defined by the primary variable of the solver, or for a permutation vector defined by an optional flag that is used as a mask to define the set of active nodes.
References elementdescription::elementinfo(), integration::gausspoints(), generalutils::getvarname(), messages::info(), lists::listcheckpresentanybc(), lists::listcheckpresentanybodyforce(), lists::listgetlogical(), solver(), lists::variableadd(), lists::variableget(), and messages::warn().
Referenced by nodaldisplacementpenalty(), saveline(), and mainutils::singlesolver().
subroutine solverutils::calculatenodalweights | ( | type(solver_t) | Solver, |
logical | WeightAtBoundary, | ||
integer, dimension(:), optional, pointer | Perm, | ||
character(*), optional | VarName | ||
) |
Computing nodal weight may be good when one needs to transform nodal information back to continuous fields by dividing with the nodal weight. Active either for the permutation defined by the primary variable of the solver, or for a permutation vector defined by an optional flag that is used as a mask to define the set of active nodes.
References elementdescription::elementinfo(), integration::gausspoints(), generalutils::getvarname(), messages::info(), lists::listcheckpresentanybc(), lists::listcheckpresentanybodyforce(), lists::listgetlogical(), solver(), lists::variableadd(), lists::variableget(), and messages::warn().
real(kind=dp) function solverutils::changematrixelement | ( | type(matrix_t) | A, |
integer | i, | ||
integer | j, | ||
real(kind=dp) | NewValue | ||
) |
Changes the value of a given matrix element.
References crsmatrix::crs_changematrixelement(), and messages::warn().
Referenced by movematrixelement().
real(kind=dp) function solverutils::changematrixelement | ( | type(matrix_t) | A, |
integer | i, | ||
integer | j, | ||
real(kind=dp) | NewValue | ||
) |
Changes the value of a given matrix element.
References crsmatrix::crs_changematrixelement(), and messages::warn().
subroutine solverutils::checknormaltangentialboundary | ( | type(model_t) | Model, |
character(len=*) | VariableName, | ||
integer | NumberOfBoundaryNodes, | ||
integer, dimension(:), pointer | BoundaryReorder, | ||
real(kind=dp), dimension(:,:), pointer | BoundaryNormals, | ||
real(kind=dp), dimension(:,:), pointer | BoundaryTangent1, | ||
real(kind=dp), dimension(:,:), pointer | BoundaryTangent2, | ||
integer | dim | ||
) |
Check if Normal / Tangential vector boundary conditions present and allocate space for normals, and if in 3D for two tangent direction vectors.
References lists::listgetlogical(), lists::listgetreal(), parallelutils::parallelinitmatrix(), and searchnodel().
subroutine solverutils::checknormaltangentialboundary | ( | type(model_t) | Model, |
character(len=*) | VariableName, | ||
integer | NumberOfBoundaryNodes, | ||
integer, dimension(:), pointer | BoundaryReorder, | ||
real(kind=dp), dimension(:,:), pointer | BoundaryNormals, | ||
real(kind=dp), dimension(:,:), pointer | BoundaryTangent1, | ||
real(kind=dp), dimension(:,:), pointer | BoundaryTangent2, | ||
integer | dim | ||
) |
Check if Normal / Tangential vector boundary conditions present and allocate space for normals, and if in 3D for two tangent direction vectors.
References lists::listgetlogical(), lists::listgetreal(), parallelutils::parallelinitmatrix(), and searchnodel().
Referenced by initializetozero().
logical function solverutils::checkpassiveelement | ( | type(element_t), optional, target | UElement) |
Check if the current element has been defined passive. This is done by inspecting a looking an the values of "varname Passive" in the Body Force section. It is determined to be passive if it has more positive than negative hits in an element.
References generalutils::getvarname(), lists::listcheckpresent(), lists::listgetinteger(), and lists::listgetreal().
logical function solverutils::checkpassiveelement | ( | type(element_t), optional, target | UElement) |
Check if the current element has been defined passive. This is done by inspecting a looking an the values of "varname Passive" in the Body Force section. It is determined to be passive if it has more positive than negative hits in an element.
References generalutils::getvarname(), lists::listcheckpresent(), lists::listgetinteger(), and lists::listgetreal().
Referenced by getpassiveboundary(), setdirichletboundaries(), updateglobalequations(), updateglobalforce(), and updatemassmatrix().
logical function solverutils::checkstepsize | ( | type(solver_t), target | Solver, |
logical | FirstTrial, | ||
real(kind=dp) | PrevResidual, | ||
real(kind=dp) | Residual, | ||
integer, optional | nsize, | ||
real(kind=dp), dimension(:), optional, target | values, | ||
real(kind=dp), dimension(:), optional, target | values0 | ||
) |
Checks stepsize of a linear system so that the error has decreased.
References computenorm(), messages::fatal(), generalutils::i2s(), messages::info(), lists::listgetconstreal(), lists::listgetstring(), matrixvectormultiply(), solver(), lists::variableget(), and messages::warn().
Referenced by mainutils::coupledsolver().
logical function solverutils::checkstepsize | ( | type(solver_t), target | Solver, |
logical | FirstTrial, | ||
real(kind=dp) | PrevResidual, | ||
real(kind=dp) | Residual, | ||
integer, optional | nsize, | ||
real(kind=dp), dimension(:), optional, target | values, | ||
real(kind=dp), dimension(:), optional, target | values0 | ||
) |
Checks stepsize of a linear system so that the error has decreased.
References computenorm(), messages::fatal(), generalutils::i2s(), messages::info(), lists::listgetconstreal(), lists::listgetstring(), matrixvectormultiply(), solver(), lists::variableget(), and messages::warn().
subroutine solverutils::computechange | ( | type(solver_t), target | Solver, |
logical | SteadyState, | ||
integer, optional | nsize, | ||
real(kind=dp), dimension(:), optional, target | values, | ||
real(kind=dp), dimension(:), optional, target | values0 | ||
) |
When a new field has been computed compare it to the previous one. Different convergence measures may be used. Also performs relaxation if a non-unity relaxation factor is given.
References computenorm(), messages::fatal(), generalutils::i2s(), messages::info(), lists::listgetconstreal(), lists::listgetcreal(), lists::listgetinteger(), lists::listgetlogical(), lists::listgetstring(), matrixvectormultiply(), parallelutils::parallelnorm(), parallelutils::parallelvector(), solver(), sparitersolve::sparmatrixvector(), updateexportedvariables(), lists::variableget(), and messages::warn().
Referenced by datatofieldsolver(), eliminatedirichlet(), flowsolver(), heatsolver(), setadvectedfield(), solvecoupled(), and solvelinearsystem().
subroutine solverutils::computechange | ( | type(solver_t), target | Solver, |
logical | SteadyState, | ||
integer, optional | nsize, | ||
real(kind=dp), dimension(:), optional, target | values, | ||
real(kind=dp), dimension(:), optional, target | values0 | ||
) |
When a new field has been computed compare it to the previous one. Different convergence measures may be used. Also performs relaxation if a non-unity relaxation factor is given.
References computenorm(), messages::fatal(), generalutils::i2s(), messages::info(), lists::listgetconstreal(), lists::listgetcreal(), lists::listgetinteger(), lists::listgetlogical(), lists::listgetstring(), matrixvectormultiply(), parallelutils::parallelnorm(), parallelutils::parallelvector(), solver(), sparitersolve::sparmatrixvector(), updateexportedvariables(), lists::variableget(), and messages::warn().
real(kind=dp) function solverutils::computenorm | ( | type(solver_t), target | Solver, |
integer | nin, | ||
real(kind=dp), dimension(:), optional, target | values | ||
) |
Computes the norm related to a solution vector of the Solver.
References lists::listgetinteger(), lists::listgetintegerarray(), parallelutils::parallelreduction(), and solver().
Referenced by checkstepsize(), checkstepsizeblock(), computeblocknorm(), computechange(), mainutils::solveequations(), and solvelinearsystem().
real(kind=dp) function solverutils::computenorm | ( | type(solver_t), target | Solver, |
integer | nin, | ||
real(kind=dp), dimension(:), optional, target | values | ||
) |
Computes the norm related to a solution vector of the Solver.
References lists::listgetinteger(), lists::listgetintegerarray(), parallelutils::parallelreduction(), and solver().
subroutine solverutils::condensate | ( | integer | N, |
real(kind=dp), dimension(:,:) | K, | ||
real(kind=dp), dimension(:) | F, | ||
real(kind=dp), dimension(:), optional | F1 | ||
) |
References linearalgebra::invertmatrix().
Referenced by advectiondiffusionsolver(), freesurfacesolver(), heatsolver(), kesolver(), komega(), levelsetsolver(), reynoldssolver(), richardssolver(), spalartallmaras(), sstkomega(), v2f(), and v2f_ldm().
subroutine solverutils::condensate | ( | integer | N, |
real(kind=dp), dimension(:,:) | K, | ||
real(kind=dp), dimension(:) | F, | ||
real(kind=dp), dimension(:), optional | F1 | ||
) |
subroutine solverutils::condensatep | ( | integer | N, |
integer | Nb, | ||
real(kind=dp), dimension(:,:) | K, | ||
real(kind=dp), dimension(:) | F, | ||
real(kind=dp), dimension(:), optional | F1 | ||
) |
Subroutine for condensation of p element bubbles from linear problem. Modifies given stiffness matrix and force vector(s)
n | Sum of nodal, edge and face degrees of freedom. |
nb | Sum of internal (bubble) degrees of freedom. |
k | Local stiffness matrix. |
f | Local force vector. |
f1 | Local second force vector. |
References linearalgebra::invertmatrix().
Referenced by kesolver().
subroutine solverutils::condensatep | ( | integer | N, |
integer | Nb, | ||
real(kind=dp), dimension(:,:) | K, | ||
real(kind=dp), dimension(:) | F, | ||
real(kind=dp), dimension(:), optional | F1 | ||
) |
Subroutine for condensation of p element bubbles from linear problem. Modifies given stiffness matrix and force vector(s)
n | Sum of nodal, edge and face degrees of freedom. |
nb | Sum of internal (bubble) degrees of freedom. |
k | Local stiffness matrix. |
f | Local force vector. |
f1 | Local second force vector. |
References linearalgebra::invertmatrix().
subroutine solverutils::copybulkmatrix | ( | type(matrix_t) | A) |
Create a copy of the linear system (Values,Rhs) to (BulkValues,BulkRhs).
Referenced by defutils::defaultfinishassembly(), defutils::defaultfinishboundaryassembly(), and defutils::defaultfinishbulkassembly().
subroutine solverutils::determinesoftlimiter | ( | type(solver_t) | Solver) |
Determine soft limiters set. This is called after the solution. and can therefore be active only on the 2nd nonlinear iteration round.
References generalutils::getvarname(), messages::info(), lists::listcheckpresentanybc(), lists::listcheckpresentanybodyforce(), lists::listgetconstreal(), lists::listgetinteger(), lists::listgetlogical(), lists::listgetreal(), solver(), lists::variableget(), and messages::warn().
subroutine solverutils::determinesoftlimiter | ( | type(solver_t) | Solver) |
Determine soft limiters set. This is called after the solution. and can therefore be active only on the 2nd nonlinear iteration round.
References generalutils::getvarname(), messages::info(), lists::listcheckpresentanybc(), lists::listcheckpresentanybodyforce(), lists::listgetconstreal(), lists::listgetinteger(), lists::listgetlogical(), lists::listgetreal(), solver(), lists::variableget(), and messages::warn().
Referenced by solvelinearsystem().
subroutine solverutils::fct_correction | ( | type(solver_t), pointer | Solver) |
References defutils::defaultvariableadd(), generalutils::getvarname(), messages::info(), lists::listgetcreal(), lists::listgetlogical(), solvelinearsystem(), solver(), lists::variableaddvector(), and lists::variableget().
Referenced by defutils::defaultsolve().
subroutine solverutils::fct_correction | ( | type(solver_t), pointer | Solver) |
Make the high-order flux corrected transport (FCT) correction after the low order approximation has been solved.
For more information see, for example, Dmitri Kuzmin (2008): "Explicit and implicit FEM-FCT algorithms with flux linearization"
References generalutils::getvarname(), messages::info(), lists::listgetcreal(), lists::listgetlogical(), lists::listgetnamespace(), lists::listsetnamespace(), solvelinearsystem(), solver(), lists::variableaddvector(), and lists::variableget().
subroutine solverutils::finishassembly | ( | type(solver_t) | Solver, |
real(kind=dp), dimension(:) | ForceVector | ||
) |
Update force vector AFTER ALL OTHER ASSEMBLY STEPS BUT BEFORE SETTING DIRICHLET CONDITIONS. Required only for time dependent simulations..
References listmatrix::list_tocrsmatrix(), lists::listgetstring(), and solver().
subroutine solverutils::finishassembly | ( | type(solver_t) | Solver, |
real(kind=dp), dimension(:) | ForceVector | ||
) |
Update force vector AFTER ALL OTHER ASSEMBLY STEPS BUT BEFORE SETTING DIRICHLET CONDITIONS. Required only for time dependent simulations..
References listmatrix::list_tocrsmatrix(), lists::listgetstring(), and solver().
Referenced by dcrcomplexsolver(), defutils::defaultfinishassembly(), movingelstatsolver(), outletcompute(), phasechangesolve(), and transportequationsolver().
real(kind=dp) function solverutils::getmatrixelement | ( | type(matrix_t) | A, |
integer | i, | ||
integer | j | ||
) |
Gets a matrix element.
a | Structure holding the matrix |
i | Row index |
j | Column index |
References bandmatrix::band_getmatrixelement(), crsmatrix::crs_getmatrixelement(), and listmatrix::list_getmatrixelement().
real(kind=dp) function solverutils::getmatrixelement | ( | type(matrix_t) | A, |
integer | i, | ||
integer | j | ||
) |
Gets a matrix element.
a | Structure holding the matrix |
i | Row index |
j | Column index |
References bandmatrix::band_getmatrixelement(), crsmatrix::crs_getmatrixelement(), and listmatrix::list_getmatrixelement().
subroutine solverutils::getpassiveboundary | ( | type(model_t) | Model, |
type(mesh_t) | Mesh, | ||
integer | BcId | ||
) |
Search faces between passive / non-passive domains; add to boundary elements with given bc-id.
References checkpassiveelement(), and meshutils::findmeshedges().
subroutine solverutils::getpassiveboundary | ( | type(model_t) | Model, |
type(mesh_t) | Mesh, | ||
integer | BcId | ||
) |
Search faces between passive / non-passive domains; add to boundary elements with given bc-id.
References checkpassiveelement(), and meshutils::findmeshedges().
Referenced by mainutils::solveractivate().
logical function solverutils::getsolutionrotation | ( | real(kind=dp), dimension(3,3) | A, |
integer | n | ||
) |
References coordinatesystems::coordinatesystemdimension().
logical function solverutils::getsolutionrotation | ( | real(kind=dp), dimension(3,3) | A, |
integer | n | ||
) |
References coordinatesystems::coordinatesystemdimension().
subroutine solverutils::gluelocalsubmatrix | ( | type(matrix_t) | A, |
integer | row0, | ||
integer | col0, | ||
integer | Nrow, | ||
integer | Ncol, | ||
integer, dimension(:) | RowInds, | ||
integer, dimension(:) | ColInds, | ||
integer | RowDofs, | ||
integer | ColDofs, | ||
real(kind=dp), dimension(:,:) | LocalMatrix | ||
) |
Glues a local matrix to the global one.
References crsmatrix::crs_gluelocalsubmatrix(), listmatrix::list_gluelocalsubmatrix(), localmatrix(), and messages::warn().
Referenced by mainutils::blocksystemassembly(), and coupledconstraintassembly().
subroutine solverutils::gluelocalsubmatrix | ( | type(matrix_t) | A, |
integer | row0, | ||
integer | col0, | ||
integer | Nrow, | ||
integer | Ncol, | ||
integer, dimension(:) | RowInds, | ||
integer, dimension(:) | ColInds, | ||
integer | RowDofs, | ||
integer | ColDofs, | ||
real(kind=dp), dimension(:,:) | LocalMatrix | ||
) |
Glues a local matrix to the global one.
References crsmatrix::crs_gluelocalsubmatrix(), listmatrix::list_gluelocalsubmatrix(), localmatrix(), and messages::warn().
subroutine solverutils::initializetimestep | ( | type(solver_t) | Solver) |
Initialize solver for next timestep.
solver | Solver to be initialized. |
References messages::fatal(), messages::info(), lists::listgetconstreal(), lists::listgetlogical(), lists::listgetstring(), matrixvectormultiply(), solver(), and messages::warn().
subroutine solverutils::initializetimestep | ( | type(solver_t) | Solver) |
Initialize solver for next timestep.
solver | Solver to be initialized. |
References messages::fatal(), lists::listgetconstreal(), lists::listgetstring(), solver(), and messages::warn().
Referenced by heatsolver(), outletcompute(), mainutils::solveequations(), and transportequationsolver().
subroutine solverutils::initializetozero | ( | type(matrix_t), pointer | A, |
real(kind=dp), dimension(:) | ForceVector | ||
) |
Initialize matrix structure and vector to zero initial value.
a | Matrix to be initialized |
forcevector | vector to be initialized |
References averageboundarynormals(), bandmatrix::band_zeromatrix(), checknormaltangentialboundary(), coordinatesystems::coordinatesystemdimension(), crsmatrix::crs_zeromatrix(), generalutils::getvarname(), and solver().
Referenced by acousticssolver(), mainutils::blocksolver(), dcrcomplexsolver(), defutils::defaultinitialize(), flowsolver(), magneticw1solver(), movingelstatsolver(), outletcompute(), phasechangesolve(), rateofchangesolver(), stokessolver(), and transportequationsolver().
subroutine solverutils::initializetozero | ( | type(matrix_t), pointer | A, |
real(kind=dp), dimension(:) | ForceVector | ||
) |
Initialize matrix structure and vector to zero initial value.
a | Matrix to be initialized |
forcevector | vector to be initialized |
References averageboundarynormals(), bandmatrix::band_zeromatrix(), checknormaltangentialboundary(), coordinatesystems::coordinatesystemdimension(), crsmatrix::crs_zeromatrix(), generalutils::getvarname(), and solver().
recursive subroutine solverutils::invalidatevariable | ( | type(mesh_t), pointer | TopMesh, |
type(mesh_t), pointer | PrimaryMesh, | ||
character(len=*) | Name | ||
) |
recursive subroutine solverutils::invalidatevariable | ( | type(mesh_t), pointer | TopMesh, |
type(mesh_t), pointer | PrimaryMesh, | ||
character(len=*) | Name | ||
) |
subroutine solverutils::laplacematrixassembly | ( | type(solver_t) | Solver, |
integer, dimension(:), pointer | Perm, | ||
type(matrix_t), pointer | A | ||
) |
Assemble Laplace matrix related to a solver and permutation vector.
References elementdescription::elementinfo(), integration::gausspoints(), meshutils::makepermusingmask(), solver(), and updateglobalequations().
Referenced by blocksolve::blockprecmatrix().
subroutine solverutils::laplacematrixassembly | ( | type(solver_t) | Solver, |
integer, dimension(:), pointer | Perm, | ||
type(matrix_t), pointer | A | ||
) |
Assemble Laplace matrix related to a solver and permutation vector.
References elementdescription::elementinfo(), integration::gausspoints(), meshutils::makepermusingmask(), solver(), and updateglobalequations().
subroutine solverutils::linearsystemmultiply | ( | type(solver_t) | Solver) |
Multiply a linear system by a constant or a given scalar field.
There are three multiplication modes: 1) Multiply matrix or rhs with a constant factor 2) Multiply matrix or rhs with a constant factor but only blockwise 3) Multiply matrix or rhs with a vector retrieved by a field variable And also three things to multiply: a) The right-hand-side of the linear system b) The matrix part of the linear system c) The diagonal entries of the matrix Possible uses of the routine include cases where the user wants to introduce diagonal implicit relaxation to the linear system, or to eliminate some coupling terms in monolithic systems that make the solution of the linear problems more difficult.
References messages::fatal(), messages::info(), lists::listgetcreal(), lists::listgetlogical(), lists::listgetstring(), solver(), and lists::variableget().
subroutine solverutils::linearsystemmultiply | ( | type(solver_t) | Solver) |
Multiply a linear system by a constant or a given scalar field.
There are three multiplication modes: 1) Multiply matrix or rhs with a constant factor 2) Multiply matrix or rhs with a constant factor but only blockwise 3) Multiply matrix or rhs with a vector retrieved by a field variable And also three things to multiply: a) The right-hand-side of the linear system b) The matrix part of the linear system c) The diagonal entries of the matrix Possible uses of the routine include cases where the user wants to introduce diagonal implicit relaxation to the linear system, or to eliminate some coupling terms in monolithic systems that make the solution of the linear problems more difficult.
References messages::fatal(), messages::info(), lists::listgetcreal(), lists::listgetlogical(), lists::listgetstring(), solver(), and lists::variableget().
Referenced by defutils::defaultfinishassembly(), and defutils::defaultfinishbulkassembly().
subroutine solverutils::massmatrixassembly | ( | type(solver_t) | Solver, |
integer, dimension(:), pointer | Perm, | ||
type(matrix_t), pointer | A | ||
) |
Assemble mass matrix related to a solver and permutation vector.
References elementdescription::elementinfo(), integration::gausspoints(), solver(), and updateglobalequations().
Referenced by blocksolve::blockprecmatrix().
subroutine solverutils::massmatrixassembly | ( | type(solver_t) | Solver, |
integer, dimension(:), pointer | Perm, | ||
type(matrix_t), pointer | A | ||
) |
Assemble mass matrix related to a solver and permutation vector.
References elementdescription::elementinfo(), integration::gausspoints(), solver(), and updateglobalequations().
subroutine solverutils::matrixvectormultiply | ( | type(matrix_t) | A, |
real(kind=dp), dimension(:) | u, | ||
real(kind=dp), dimension(:) | v | ||
) |
Matrix vector multiplication of sparse matrices.
References bandmatrix::band_matrixvectormultiply(), crsmatrix::crs_matrixvectormultiply(), and messages::warn().
subroutine solverutils::matrixvectormultiply | ( | type(matrix_t) | A, |
real(kind=dp), dimension(:) | u, | ||
real(kind=dp), dimension(:) | v | ||
) |
Matrix vector multiplication of sparse matrices.
References bandmatrix::band_matrixvectormultiply(), crsmatrix::crs_matrixvectormultiply(), and messages::warn().
Referenced by checkstepsize(), computeblocknorm(), computechange(), computevarloads(), fetisolve::fetifloatingdomain(), fetisolve::fetiprec(), initializetimestep(), lumpedsprings(), mortarrobinsolver(), solvelinearsystem(), and statelecsolver().
subroutine solverutils::mortarrobinsolver | ( | type(matrix_t), pointer | A, |
real(kind=dp), dimension(:) | x, | ||
real(kind=dp), dimension(:) | b, | ||
type(solver_t) | Solver | ||
) |
Mortar Solver using unsymmetric Robin-Robin boundary conditions. The good thing with this condition compared to Dirichlet-Neumann is that you do not need to have division of the domain into two subproblems. This is probably done at the expense of convergence speed.
References crsmatrix::crs_mergematrix(), messages::fatal(), elementutils::freematrix(), messages::info(), itersolve::itersolver(), lists::listaddstring(), lists::listgetconstreal(), lists::listgetinteger(), lists::listgetstring(), lists::listsetnamespace(), matrixvectormultiply(), meshutils::periodicprojector(), solvelinearsystem(), solver(), and transposematrixvectormultiply().
Referenced by solvelinearsystem().
subroutine solverutils::mortarrobinsolver | ( | type(matrix_t), pointer | A, |
real(kind=dp), dimension(:) | x, | ||
real(kind=dp), dimension(:) | b, | ||
type(solver_t) | Solver | ||
) |
Mortar Solver using unsymmetric Robin-Robin boundary conditions. The good thing with this condition compared to Dirichlet-Neumann is that you do not need to have division of the domain into two subproblems. This is probably done at the expense of convergence speed.
References crsmatrix::crs_mergematrix(), messages::fatal(), elementutils::freematrix(), messages::info(), itersolve::itersolver(), lists::listaddstring(), lists::listgetconstreal(), lists::listgetinteger(), lists::listgetstring(), lists::listsetnamespace(), matrixvectormultiply(), meshutils::periodicprojector(), solvelinearsystem(), solver(), and transposematrixvectormultiply().
subroutine solverutils::movematrixelement | ( | type(matrix_t) | A, |
integer | i1, | ||
integer | j1, | ||
integer | i2, | ||
integer | j2 | ||
) |
Moves a matrix element from one position adding it to the value of another one.
References addtomatrixelement(), and changematrixelement().
subroutine solverutils::movematrixelement | ( | type(matrix_t) | A, |
integer | i1, | ||
integer | j1, | ||
integer | i2, | ||
integer | j2 | ||
) |
Moves a matrix element from one position adding it to the value of another one.
References addtomatrixelement(), and changematrixelement().
subroutine solverutils::moverow | ( | type(matrix_t) | A, |
integer | n1, | ||
integer | n2, | ||
real(kind=dp), optional | Coeff | ||
) |
Moves a row and and sumes it with the values of a second one, optionally multiplying with a constant.
References crsmatrix::crs_moverow(), listmatrix::list_moverow(), and messages::warn().
subroutine solverutils::moverow | ( | type(matrix_t) | A, |
integer | n1, | ||
integer | n2, | ||
real(kind=dp), optional | Coeff | ||
) |
Moves a row and and sumes it with the values of a second one, optionally multiplying with a constant.
References crsmatrix::crs_moverow(), listmatrix::list_moverow(), and messages::warn().
Referenced by coupledconstraintassembly().
subroutine solverutils::nscondensate | ( | integer | N, |
integer | Nb, | ||
integer | dim, | ||
real(kind=dp), dimension(:,:) | K, | ||
real(kind=dp), dimension(:) | F, | ||
real(kind=dp), dimension(:) | F1 | ||
) |
Eliminates bubble degrees of freedom from a local linear system.
References linearalgebra::invertmatrix().
Referenced by flowsolver().
subroutine solverutils::nscondensate | ( | integer | N, |
integer | Nb, | ||
integer | dim, | ||
real(kind=dp), dimension(:,:) | K, | ||
real(kind=dp), dimension(:) | F, | ||
real(kind=dp), dimension(:) | F1 | ||
) |
Eliminates bubble degrees of freedom from a local linear system.
References linearalgebra::invertmatrix().
subroutine solverutils::reverserowequilibration | ( | type(matrix_t) | A, |
real(kind=dp), dimension(:) | f | ||
) |
Scale the linear system back to original when the linear system scaling has been done by row equilibration.
References messages::fatal().
Referenced by solvelinearsystem().
subroutine solverutils::reverserowequilibration | ( | type(matrix_t) | A, |
real(kind=dp), dimension(:) | f | ||
) |
Scale the linear system back to original when the linear system scaling has been done by row equilibration.
References messages::fatal().
subroutine solverutils::rotatentsystem | ( | real(kind=dp), dimension(:) | Vec, |
integer | NodeNumber | ||
) |
Rotate a vector to normal-tangential coordinate system.
References coordinatesystems::coordinatesystemdimension().
Referenced by checkntelement(), and setelementvalues().
subroutine solverutils::rotatentsystem | ( | real(kind=dp), dimension(:) | Vec, |
integer | NodeNumber | ||
) |
Rotate a vector to normal-tangential coordinate system.
References coordinatesystems::coordinatesystemdimension().
subroutine solverutils::rowequilibration | ( | type(matrix_t) | A, |
real(kind=dp), dimension(:) | f, | ||
logical | Parallel | ||
) |
Equilibrate the rows of the coefficient matrix A to minimize the condition number. The associated rhs vector f is also scaled.
References messages::info(), parallelutils::parallelreduction(), and parallelutils::parallelsumvector().
subroutine solverutils::rowequilibration | ( | type(matrix_t) | A, |
real(kind=dp), dimension(:) | f, | ||
logical | Parallel | ||
) |
Equilibrate the rows of the coefficient matrix A to minimize the condition number. The associated rhs vector f is also scaled.
References messages::info(), parallelutils::parallelreduction(), and parallelutils::parallelsumvector().
Referenced by solvelinearsystem(), and stokessolver().
subroutine solverutils::scalelinearsystem | ( | type(solver_t) | Solver, |
type(matrix_t) | A, | ||
real(kind=dp), dimension(:), optional | b, | ||
real(kind=dp), dimension(:), optional | x, | ||
real(kind=dp), dimension(:), optional, target | DiagScaling, | ||
logical, optional | ApplyScaling, | ||
logical, optional | RhsScaling, | ||
logical, optional | ConstraintScaling | ||
) |
Scale system Ax = b as: (DAD)y = Db, where D = 1/SQRT(Diag(A)), and y = D^-1 x.
References parallelutils::parallelreduction(), parallelutils::parallelsumvector(), and solver().
Referenced by mainutils::blocksolver(), defutils::defaultdirichletbcs(), solvelinearsystem(), and stokessolver().
subroutine solverutils::scalelinearsystem | ( | type(solver_t) | Solver, |
type(matrix_t) | A, | ||
real(kind=dp), dimension(:), optional | b, | ||
real(kind=dp), dimension(:), optional | x, | ||
real(kind=dp), dimension(:), optional, target | DiagScaling, | ||
logical, optional | ApplyScaling, | ||
logical, optional | RhsScaling, | ||
logical, optional | ConstraintScaling | ||
) |
Scale system Ax = b as: (DAD)y = Db, where D = 1/SQRT(Diag(A)), and y = D^-1 x.
References parallelutils::parallelreduction(), parallelutils::parallelsumvector(), and solver().
integer function solverutils::searchnodel | ( | type (parallelinfo_t) | ParallelInfo, |
integer | QueriedNode, | ||
integer | n | ||
) |
Search an element QueriedNode from an ordered set Nodes and return Index to Nodes structure. Return value -1 means QueriedNode was not found.
integer function solverutils::searchnodel | ( | type (parallelinfo_t) | ParallelInfo, |
integer | QueriedNode, | ||
integer | n | ||
) |
Search an element QueriedNode from an ordered set Nodes and return Index to Nodes structure. Return value -1 means QueriedNode was not found.
Referenced by averageboundarynormals(), and checknormaltangentialboundary().
subroutine solverutils::setdirichletboundaries | ( | type(model_t) | Model, |
type(matrix_t), pointer | A, | ||
real(kind=dp), dimension(:) | b, | ||
character(len=*) | Name, | ||
integer | DOF, | ||
integer | NDOFs, | ||
integer, dimension(:) | Perm, | ||
integer, optional | PermOffSet, | ||
logical, optional | OffDiagonalMatrix | ||
) |
Set dirichlet boundary condition for given dof. The conditions are set based on the given name and applied directly to the matrix structure so that a row is zeroed except for the diagonal which is set to one. Then the r.h.s. value determines the value of the field variable in the solution of the linear system.
model | The current model structure |
a | The global matrix |
b | The global RHS vector |
name | Name of the dof to be set |
dof | The order number of the dof |
ndofs | The total number of DOFs for this equation |
perm | The node reordering info, this has been generated at the beginning of the simulation for bandwidth optimization |
permoffset | If the matrix and permutation vectors are not in sync the offset may used as a remedy. Needed in fully coupled systems. |
offdiagonalmatrix | For block systems the only the diagonal matrix should be given non-zero entries for matrix and r.h.s., for off-diagonal matrices just set the row to zero. |
References checkntelement(), checkpassiveelement(), messages::fatal(), lists::listaddintegerarray(), lists::listcheckpresent(), lists::listgetconstreal(), lists::listgetconstrealarray(), lists::listgetinteger(), lists::listgetintegerarray(), lists::listgetlogical(), parallelutils::parallelreduction(), setelementvalues(), setlimitervalues(), setperiodicboundariespass1(), setperiodicboundariespass2(), setpointvalues(), sgetelementdofs(), solver(), and zerorow().
subroutine solverutils::setdirichletboundaries | ( | type(model_t) | Model, |
type(matrix_t), pointer | A, | ||
real(kind=dp), dimension(:) | b, | ||
character(len=*) | Name, | ||
integer | DOF, | ||
integer | NDOFs, | ||
integer, dimension(:) | Perm, | ||
integer, optional | PermOffSet, | ||
logical, optional | OffDiagonalMatrix | ||
) |
Set dirichlet boundary condition for given dof. The conditions are set based on the given name and applied directly to the matrix structure so that a row is zeroed except for the diagonal which is set to one. Then the r.h.s. value determines the value of the field variable in the solution of the linear system.
model | The current model structure |
a | The global matrix |
b | The global RHS vector |
name | Name of the dof to be set |
dof | The order number of the dof |
ndofs | The total number of DOFs for this equation |
perm | The node reordering info, this has been generated at the beginning of the simulation for bandwidth optimization |
permoffset | If the matrix and permutation vectors are not in sync the offset may used as a remedy. Needed in fully coupled systems. |
offdiagonalmatrix | For block systems the only the diagonal matrix should be given non-zero entries for matrix and r.h.s., for off-diagonal matrices just set the row to zero. |
References checkntelement(), checkpassiveelement(), messages::fatal(), lists::listaddintegerarray(), lists::listcheckpresent(), lists::listgetconstreal(), lists::listgetconstrealarray(), lists::listgetinteger(), lists::listgetintegerarray(), lists::listgetlogical(), parallelutils::parallelreduction(), setelementvalues(), setlimitervalues(), setperiodicboundariespass1(), setperiodicboundariespass2(), setpointvalues(), sgetelementdofs(), solver(), and zerorow().
Referenced by acousticssolver(), dcrcomplexsolver(), defutils::defaultdirichletbcs(), movingelstatsolver(), rateofchangesolver(), and solveharmonicsystem().
subroutine solverutils::setdirichletpoint | ( | type(matrix_t), pointer | StiffMatrix, |
real(kind=dp), dimension(:) | ForceVector, | ||
integer | DOF, | ||
integer | NDOFs, | ||
integer, dimension(:) | Perm, | ||
integer | NodeIndex, | ||
real(kind=dp) | NodeValue | ||
) |
Sets just one Dirichlet point in contrast to setting the whole field. This is a lower order routine that the previous one.
References crsmatrix::crs_setsymmdirichlet(), bandmatrix::sband_setdirichlet(), setmatrixelement(), and zerorow().
Referenced by lumpeddisplacements(), movingelstatsolver(), and rigidbody().
subroutine solverutils::setdirichletpoint | ( | type(matrix_t), pointer | StiffMatrix, |
real(kind=dp), dimension(:) | ForceVector, | ||
integer | DOF, | ||
integer | NDOFs, | ||
integer, dimension(:) | Perm, | ||
integer | NodeIndex, | ||
real(kind=dp) | NodeValue | ||
) |
Sets just one Dirichlet point in contrast to setting the whole field. This is a lower order routine that the previous one.
References crsmatrix::crs_setsymmdirichlet(), bandmatrix::sband_setdirichlet(), setmatrixelement(), and zerorow().
subroutine solverutils::setmatrixelement | ( | type(matrix_t) | A, |
integer | i, | ||
integer | j, | ||
real(kind=dp) | VALUE | ||
) |
Sets the matrix element to a desired value.
a | Structure holding the matrix |
i | Row index |
j | Column index |
value | Value to be obtained |
References bandmatrix::band_setmatrixelement(), crsmatrix::crs_setmatrixelement(), listmatrix::list_setmatrixelement(), and listmatrix::list_tolistmatrix().
Referenced by acousticssolver(), coupledconstraintassembly(), defutils::defaultdirichletbcs(), dosolve(), fetisolve::fetiadddtob(), fetisolve::fetisendrecvif(), freesurfacesolver(), kesolver(), komegawalllaw(), nullifyedgedofs(), omegawall(), outletcompute(), pressuresolver(), setboundaryconditions(), setdirichletpoint(), setdirichletpoints(), setelementvalues(), setlimitervalues(), setperiodicboundariespass1(), setpointvalues(), and stokessolver().
subroutine solverutils::setmatrixelement | ( | type(matrix_t) | A, |
integer | i, | ||
integer | j, | ||
real(kind=dp) | VALUE | ||
) |
Sets the matrix element to a desired value.
a | Structure holding the matrix |
i | Row index |
j | Column index |
value | Value to be obtained |
References bandmatrix::band_setmatrixelement(), crsmatrix::crs_setmatrixelement(), listmatrix::list_setmatrixelement(), and listmatrix::list_tolistmatrix().
subroutine solverutils::setnodalloads | ( | type(model_t) | Model, |
type(matrix_t), pointer | A, | ||
real(kind=dp), dimension(:) | b, | ||
character(len=*) | Name, | ||
integer | DOF, | ||
integer | NDOFs, | ||
integer, dimension(:) | Perm | ||
) |
Sets nodal loads directly to the matrix structure. The intended use for this, is for example, in multiphysics coupling where the nodal loads may have been computed by another solver.
model | The current model structure |
a | The global matrix |
b | The global RHS vector |
name | Name of the dof to be set |
dof | The order number of the dof |
ndofs | The total number of DOFs for this equation |
perm | The node reordering info, this has been generated at the beginning of the simulation for bandwidth optimization. |
References messages::info(), lists::listaddintegerarray(), lists::listcheckpresent(), lists::listgetconstreal(), lists::listgetconstrealarray(), lists::listgetinteger(), lists::listgetintegerarray(), parallelutils::parallelreduction(), setelementloads(), setpointloads(), and sgetelementdofs().
subroutine solverutils::setnodalloads | ( | type(model_t) | Model, |
type(matrix_t), pointer | A, | ||
real(kind=dp), dimension(:) | b, | ||
character(len=*) | Name, | ||
integer | DOF, | ||
integer | NDOFs, | ||
integer, dimension(:) | Perm | ||
) |
Sets nodal loads directly to the matrix structure. The intended use for this, is for example, in multiphysics coupling where the nodal loads may have been computed by another solver.
model | The current model structure |
a | The global matrix |
b | The global RHS vector |
name | Name of the dof to be set |
dof | The order number of the dof |
ndofs | The total number of DOFs for this equation |
perm | The node reordering info, this has been generated at the beginning of the simulation for bandwidth optimization. |
References messages::info(), lists::listaddintegerarray(), lists::listcheckpresent(), lists::listgetconstreal(), lists::listgetconstrealarray(), lists::listgetinteger(), lists::listgetintegerarray(), parallelutils::parallelreduction(), setelementloads(), setpointloads(), and sgetelementdofs().
Referenced by defutils::defaultdirichletbcs().
integer function solverutils::sgetelementdofs | ( | integer, dimension(:) | Indexes, |
type(element_t), optional, target | UElement, | ||
type(solver_t), optional, target | USolver | ||
) |
References pelementmaps::ispelement(), lists::listgetlogical(), and solver().
integer function solverutils::sgetelementdofs | ( | integer, dimension(:) | Indexes, |
type(element_t), optional, target | UElement, | ||
type(solver_t), optional, target | USolver | ||
) |
References pelementmaps::ispelement(), lists::listgetlogical(), and solver().
Referenced by setdirichletboundaries(), and setnodalloads().
subroutine solverutils::solveeigensystem | ( | type(matrix_t), pointer | StiffMatrix, |
integer | NOFEigen, | ||
complex(kind=dp), dimension(:) | EigenValues, | ||
complex(kind=dp), dimension(:,:) | EigenVectors, | ||
type(solver_t) | Solver | ||
) |
Solve a linear eigen system.
References eigensolve::arpackeigensolve(), eigensolve::arpackeigensolvecomplex(), linearalgebra::eigenvalues(), lists::listaddlogical(), paralleleigensolve::parallelarpackeigensolve(), and solver().
Referenced by solvelinearsystem().
subroutine solverutils::solveeigensystem | ( | type(matrix_t), pointer | StiffMatrix, |
integer | NOFEigen, | ||
complex(kind=dp), dimension(:) | EigenValues, | ||
complex(kind=dp), dimension(:,:) | EigenVectors, | ||
type(solver_t) | Solver | ||
) |
Solve a linear eigen system.
References eigensolve::arpackeigensolve(), eigensolve::arpackeigensolvecomplex(), linearalgebra::eigenvalues(), lists::listaddlogical(), paralleleigensolve::parallelarpackeigensolve(), and solver().
subroutine solverutils::solveharmonicsystem | ( | type(matrix_t), target | G, |
type(solver_t) | Solver | ||
) |
Solves a harmonic system.
References elementutils::creatematrix(), messages::fatal(), g(), messages::info(), lists::listaddconstreal(), lists::listaddlogical(), lists::listcheckpresent(), lists::listgetangularfrequency(), lists::listgetconstrealarray(), lists::listgetinteger(), lists::listgetlogical(), lists::listgetstring(), setdirichletboundaries(), solvelinearsystem(), and solver().
subroutine solverutils::solveharmonicsystem | ( | type(matrix_t), target | G, |
type(solver_t) | Solver | ||
) |
Solves a harmonic system.
References elementutils::creatematrix(), messages::fatal(), g(), messages::info(), lists::listaddconstreal(), lists::listaddlogical(), lists::listcheckpresent(), lists::listgetangularfrequency(), lists::listgetconstrealarray(), lists::listgetinteger(), lists::listgetlogical(), lists::listgetstring(), setdirichletboundaries(), solvelinearsystem(), and solver().
Referenced by solvelinearsystem().
recursive subroutine solverutils::solvelinearsystem | ( | type(matrix_t), pointer | A, |
real(kind=dp), dimension(:) | b, | ||
real(kind=dp), dimension(:) | x, | ||
real(kind=dp) | Norm, | ||
integer | DOFs, | ||
type(solver_t), target | Solver, | ||
type(matrix_t), optional, pointer | BulkMatrix | ||
) |
Solves a linear system and also calls the necessary preconditioning routines.
References backrotatentsystem(), backscalelinearsystem(), blocksolveext(), computechange(), computenorm(), determinesoftlimiter(), directsolve::directsolver(), messages::fatal(), fetisolver(), generalutils::getvarname(), messages::info(), invalidatevariable(), itersolve::itersolver(), lists::listaddconstreal(), lists::listgetinteger(), lists::listgetlogical(), lists::listgetstring(), matrixvectormultiply(), mortarrobinsolver(), multigrid::multigridsolve(), parallelutils::parallelinitmatrix(), parallelutils::parallelinitsolve(), parallelutils::paralleliter(), parallelutils::parallelmatrixvector(), parallelutils::parallelreduction(), parallelutils::parallelsumvector(), reverserowequilibration(), rowequilibration(), scalelinearsystem(), solveeigensystem(), solveharmonicsystem(), solver(), vankacreate(), and lists::variableget().
recursive subroutine solverutils::solvelinearsystem | ( | type(matrix_t), pointer | A, |
real(kind=dp), dimension(:) | b, | ||
real(kind=dp), dimension(:) | x, | ||
real(kind=dp) | Norm, | ||
integer | DOFs, | ||
type(solver_t), target | Solver, | ||
type(matrix_t), optional, pointer | BulkMatrix | ||
) |
Solves a linear system and also calls the necessary preconditioning routines.
References backrotatentsystem(), backscalelinearsystem(), blocksolveext(), computechange(), computenorm(), determinesoftlimiter(), directsolve::directsolver(), messages::fatal(), fetisolver(), generalutils::getvarname(), messages::info(), invalidatevariable(), itersolve::itersolver(), lists::listaddconstreal(), lists::listgetinteger(), lists::listgetlogical(), lists::listgetstring(), matrixvectormultiply(), mortarrobinsolver(), multigrid::multigridsolve(), parallelutils::parallelinitsolve(), parallelutils::paralleliter(), parallelutils::parallelmatrixvector(), parallelutils::parallelreduction(), parallelutils::parallelsumvector(), reverserowequilibration(), rowequilibration(), scalelinearsystem(), solveeigensystem(), solveharmonicsystem(), solver(), vankacreate(), and lists::variableget().
Referenced by eliminatedirichlet(), eliminateperiodic(), fct_correction(), mortarrobinsolver(), preconditioningiteration(), rigidbody(), solveharmonicsystem(), solvesystem(), and solvewithlinearrestriction().
recursive subroutine solverutils::solvesystem | ( | type(matrix_t), pointer | A, |
type(sparitersolverglobald_t), pointer | ParA, | ||
real(kind=dp), dimension(:) | b, | ||
real(kind=dp), dimension(:) | x, | ||
real(kind=dp) | Norm, | ||
integer | DOFs, | ||
type(solver_t), target | Solver | ||
) |
Solve a system. Various additional utilities are included and naturally a call to the linear system solver.
b | The RHS vector |
x | Previous solution on entry, new solution on exit (hopefully) |
norm | L2 Norm of solution |
a | The coefficient matrix |
dofs | Number of degrees of freedom per node for this equation |
solver | Holds various solver options. |
para | holds info for parallel solver, if not executing in parallel this is just a dummy. |
References generalutils::allocatematrix(), messages::fatal(), elementutils::freematrix(), generalutils::getvarname(), messages::info(), lists::listaddconstreal(), lists::listgetconstreal(), lists::listgetlogical(), lists::listgetstring(), parallelutils::parallelinitmatrix(), solvelinearsystem(), solver(), and solvewithlinearrestriction().
Referenced by acousticssolver(), blocksolve::blockmatrixprec(), blocksolve::blockstandarditer(), dcrcomplexsolver(), defutils::defaultsolve(), heatsolver(), levelsetcurvature(), movingelstatsolver(), outletcompute(), phasechangesolve(), rateofchangesolver(), and transientphasechange().
recursive subroutine solverutils::solvesystem | ( | type(matrix_t), pointer | A, |
type(sparitersolverglobald_t), pointer | ParA, | ||
real(kind=dp), dimension(:) | b, | ||
real(kind=dp), dimension(:) | x, | ||
real(kind=dp) | Norm, | ||
integer | DOFs, | ||
type(solver_t), target | Solver | ||
) |
Solve a system. Various additional utilities are included and naturally a call to the linear system solver.
b | The RHS vector |
x | Previous solution on entry, new solution on exit (hopefully) |
norm | L2 Norm of solution |
a | The coefficient matrix |
dofs | Number of degrees of freedom per node for this equation |
solver | Holds various solver options. |
para | holds info for parallel solver, if not executing in parallel this is just a dummy. |
References generalutils::allocatematrix(), messages::fatal(), elementutils::freematrix(), generalutils::getvarname(), messages::info(), lists::listaddconstreal(), lists::listgetconstreal(), lists::listgetlogical(), lists::listgetstring(), parallelutils::parallelallreduceand(), solvelinearsystem(), solver(), and solvewithlinearrestriction().
subroutine solverutils::solvewithlinearrestriction | ( | type(matrix_t), pointer | StiffMatrix, |
real(kind=dp), dimension(:) | ForceVector, | ||
real(kind=dp), dimension(:) | Solution, | ||
real(kind=dp) | Norm, | ||
integer | DOFs, | ||
type(solver_t), target | Solver | ||
) |
This subroutine will solve the system with some linear restriction. The restriction matrix is assumed to be in the ConstraintMatrix-field of the StiffMatrix. The restriction vector is the RHS-field of the ConstraintMatrix. NOTE: Only serial solver implemented so far ...
stiffmatrix | Linear equation matrix information. The restriction matrix is assumed to be in the EMatrix-field |
forcevector | The right hand side of the linear equation |
solution | Previous solution as input, new solution as output. |
norm | The L2 norm of the solution. |
dofs | Number of degrees of freedon of the equation. |
solver | Linear equation solver options. |
References generalutils::allocatematrix(), messages::error(), messages::fatal(), elementutils::freematrix(), messages::info(), lists::listgetlogical(), lists::listgetstring(), solvelinearsystem(), solver(), and lists::variableadd().
Referenced by solvesystem().
subroutine solverutils::solvewithlinearrestriction | ( | type(matrix_t), pointer | StiffMatrix, |
real(kind=dp), dimension(:), target | ForceVector, | ||
real(kind=dp), dimension(:), target | Solution, | ||
real(kind=dp) | Norm, | ||
integer | DOFs, | ||
type(solver_t), target | Solver | ||
) |
This subroutine will solve the system with some linear restriction. The restriction matrix is assumed to be in the ConstraintMatrix-field of the StiffMatrix. The restriction vector is the RHS-field of the ConstraintMatrix. NOTE: Only serial solver implemented so far ...
stiffmatrix | Linear equation matrix information. The restriction matrix is assumed to be in the EMatrix-field |
forcevector | The right hand side of the linear equation |
solution | Previous solution as input, new solution as output. |
norm | The L2 norm of the solution. |
dofs | Number of degrees of freedon of the equation. |
solver | Linear equation solver options. |
References addtomatrixelement(), generalutils::allocatematrix(), messages::fatal(), elementutils::freematrix(), messages::info(), listmatrix::list_tocrsmatrix(), lists::listgetlogical(), lists::listgetstring(), solvelinearsystem(), solver(), lists::variableadd(), and lists::variableget().
subroutine solverutils::transposematrixvectormultiply | ( | type(matrix_t) | A, |
real(kind=dp), dimension(:) | u, | ||
real(kind=dp), dimension(:) | v | ||
) |
Matrix vector multiplication of sparse matrices.
References crsmatrix::crs_transposematrixvectormultiply(), and messages::fatal().
subroutine solverutils::transposematrixvectormultiply | ( | type(matrix_t) | A, |
real(kind=dp), dimension(:) | u, | ||
real(kind=dp), dimension(:) | v | ||
) |
Matrix vector multiplication of sparse matrices.
References crsmatrix::crs_transposematrixvectormultiply(), and messages::fatal().
Referenced by mortarrobinsolver().
subroutine solverutils::updateexportedvariables | ( | type(solver_t) | Solver) |
Updates values for exported variables which are typically auxiliary variables derived from the solution.
References messages::info(), lists::listcheckpresent(), lists::listgetcreal(), lists::listgetinteger(), lists::listgetreal(), lists::listgetstring(), solver(), lists::variableget(), and variablenameparser().
subroutine solverutils::updateexportedvariables | ( | type(solver_t) | Solver) |
Updates values for exported variables which are typically auxiliary variables derived from the solution.
References messages::info(), lists::listcheckpresent(), lists::listgetcreal(), lists::listgetinteger(), lists::listgetreal(), lists::listgetstring(), solver(), lists::variableget(), and variablenameparser().
Referenced by computechange().
subroutine solverutils::updateglobalequations | ( | type(matrix_t), pointer | StiffMatrix, |
real(kind=dp), dimension(:,:) | LocalStiffMatrix, | ||
real(kind=dp), dimension(:) | ForceVector, | ||
real(kind=dp), dimension(:) | LocalForce, | ||
integer | n, | ||
integer | NDOFs, | ||
integer, dimension(:) | NodeIndexes, | ||
logical, optional | RotateNT, | ||
type(element_t), optional, target | UElement | ||
) |
Add element local matrices & vectors to global matrices and vectors.
stiffmatrix | The global matrix |
localstiffmatrix | Local matrix to be added to the global matrix. |
localforce | Element local force vector. |
forcevector | The global RHS vector. |
n | Number of nodes. |
ndofs | Number of element nodes. |
nodeindexes | Element node to global node numbering mapping. |
rotatent | Should the global equation be done in local normal-tangential coordinates. |
uelement | Element to be updated |
References bandmatrix::band_gluelocalmatrix(), checkpassiveelement(), coordinatesystems::coordinatesystemdimension(), crsmatrix::crs_gluelocalmatrix(), listmatrix::list_gluelocalmatrix(), and elementutils::rotatematrix().
subroutine solverutils::updateglobalequations | ( | type(matrix_t), pointer | StiffMatrix, |
real(kind=dp), dimension(:,:) | LocalStiffMatrix, | ||
real(kind=dp), dimension(:) | ForceVector, | ||
real(kind=dp), dimension(:) | LocalForce, | ||
integer | n, | ||
integer | NDOFs, | ||
integer, dimension(:) | NodeIndexes, | ||
logical, optional | RotateNT, | ||
type(element_t), optional, target | UElement | ||
) |
Add element local matrices & vectors to global matrices and vectors.
stiffmatrix | The global matrix |
localstiffmatrix | Local matrix to be added to the global matrix. |
localforce | Element local force vector. |
forcevector | The global RHS vector. |
n | Number of nodes. |
ndofs | Number of element nodes. |
nodeindexes | Element node to global node numbering mapping. |
rotatent | Should the global equation be done in local normal-tangential coordinates. |
uelement | Element to be updated |
References bandmatrix::band_gluelocalmatrix(), checkpassiveelement(), coordinatesystems::coordinatesystemdimension(), crsmatrix::crs_gluelocalmatrix(), listmatrix::list_gluelocalmatrix(), and elementutils::rotatematrix().
Referenced by acousticssolver(), advectiondiffusionsolver(), dcrcomplexsolver(), defutils::defaultupdatebulkc(), defutils::defaultupdatebulkr(), defutils::defaultupdateequationsc(), defutils::defaultupdateequationsr(), fourierdiffusion3dsolver(), fourierdiffusionsolver(), heatsolver(), laplacematrixassembly(), magneticw1solver(), massmatrixassembly(), movingelstatsolver(), outletcompute(), phasechangesolve(), rateofchangesolver(), and transportequationsolver().
subroutine solverutils::updateglobalforce | ( | real(kind=dp), dimension(:) | ForceVector, |
real(kind=dp), dimension(:) | LocalForce, | ||
integer | n, | ||
integer | NDOFs, | ||
integer, dimension(:) | NodeIndexes, | ||
logical, optional | RotateNT, | ||
type(element_t), optional, target | UElement | ||
) |
Update the global vector with the local vector entry.
localforce | Element local force vector. |
forcevector | The global RHS vector. |
n | Number of nodes. |
ndofs | Number of element nodes. |
nodeindexes | Element node to global node numbering mapping. |
rotatent | Should the global equation be done in local normal-tangential coordinates. |
uelement | Element to be updated |
References checkpassiveelement(), coordinatesystems::coordinatesystemdimension(), and elementutils::rotatematrix().
Referenced by add1stordertime(), add2ndordertime(), defutils::defaultupdateforcec(), defutils::defaultupdateforcer(), and updatetimeforce().
subroutine solverutils::updateglobalforce | ( | real(kind=dp), dimension(:) | ForceVector, |
real(kind=dp), dimension(:) | LocalForce, | ||
integer | n, | ||
integer | NDOFs, | ||
integer, dimension(:) | NodeIndexes, | ||
logical, optional | RotateNT, | ||
type(element_t), optional, target | UElement | ||
) |
Update the global vector with the local vector entry.
localforce | Element local force vector. |
forcevector | The global RHS vector. |
n | Number of nodes. |
ndofs | Number of element nodes. |
nodeindexes | Element node to global node numbering mapping. |
rotatent | Should the global equation be done in local normal-tangential coordinates. |
uelement | Element to be updated |
References checkpassiveelement(), coordinatesystems::coordinatesystemdimension(), and elementutils::rotatematrix().
subroutine solverutils::updatemassmatrix | ( | type(matrix_t), pointer | StiffMatrix, |
real(kind=dp), dimension(:,:) | LocalMassMatrix, | ||
integer | n, | ||
integer | NDOFs, | ||
integer, dimension(:) | NodeIndexes | ||
) |
Updates the mass matrix only.
stiffmatrix | The global matrix |
localmassmatrix | Local matrix to be added to the global matrix |
n | number of nodes in element |
ndofs | number of DOFs per node |
nodeindexes | Element node to global node numbering mapping |
References bandmatrix::band_gluelocalmatrix(), checkpassiveelement(), crsmatrix::crs_gluelocalmatrix(), and listmatrix::list_gluelocalmatrix().
Referenced by defutils::defaultupdatedampc(), defutils::defaultupdatedampr(), defutils::defaultupdatemassc(), and defutils::defaultupdatemassr().
subroutine solverutils::updatemassmatrix | ( | type(matrix_t), pointer | StiffMatrix, |
real(kind=dp), dimension(:,:) | LocalMassMatrix, | ||
integer | n, | ||
integer | NDOFs, | ||
integer, dimension(:) | NodeIndexes | ||
) |
Updates the mass matrix only.
stiffmatrix | The global matrix |
localmassmatrix | Local matrix to be added to the global matrix |
n | number of nodes in element |
ndofs | number of DOFs per node |
nodeindexes | Element node to global node numbering mapping |
References bandmatrix::band_gluelocalmatrix(), checkpassiveelement(), crsmatrix::crs_gluelocalmatrix(), and listmatrix::list_gluelocalmatrix().
subroutine solverutils::updatetimeforce | ( | type(matrix_t), pointer | StiffMatrix, |
real(kind=dp), dimension(:) | ForceVector, | ||
real(kind=dp), dimension(:) | LocalForce, | ||
integer | n, | ||
integer | NDOFs, | ||
integer, dimension(:) | NodeIndexes | ||
) |
Update the right-hand-side of the global equation by adding the local entry.
stiffmatrix | Global stiffness matrix. |
localforce | Local right-hand-side vector. |
forcevector | Global right-hand-side vector. |
n | number of element nodes |
ndofs | variable degrees of freedom |
nodeindexes | Element node to global node numbering mapping. |
References updateglobalforce().
subroutine solverutils::updatetimeforce | ( | type(matrix_t), pointer | StiffMatrix, |
real(kind=dp), dimension(:) | ForceVector, | ||
real(kind=dp), dimension(:) | LocalForce, | ||
integer | n, | ||
integer | NDOFs, | ||
integer, dimension(:) | NodeIndexes | ||
) |
Update the right-hand-side of the global equation by adding the local entry.
stiffmatrix | Global stiffness matrix. |
localforce | Local right-hand-side vector. |
forcevector | Global right-hand-side vector. |
n | number of element nodes |
ndofs | variable degrees of freedom |
nodeindexes | Element node to global node numbering mapping. |
References updateglobalforce().
Referenced by defutils::defaultupdatetimeforcec(), and defutils::defaultupdatetimeforcer().
subroutine solverutils::variablenameparser | ( | character(len=max_name_len) | var_name, |
logical, optional | NoOutput, | ||
logical, optional | Global, | ||
integer, optional | Dofs | ||
) |
A parser of the variable name that returns the true variablename where the inline options have been interpreted.
Referenced by updateexportedvariables().
subroutine solverutils::variablenameparser | ( | character(len=max_name_len) | var_name, |
logical, optional | NoOutput, | ||
logical, optional | Global, | ||
integer, optional | Dofs | ||
) |
A parser of the variable name that returns the true variablename where the inline options have been interpreted.
subroutine solverutils::zerorow | ( | type(matrix_t) | A, |
integer | n | ||
) |
Zeros a row in matrix.
a | Structure holding the matrix |
n | Row to be zerored. |
References bandmatrix::band_zerorow(), crsmatrix::crs_zerorow(), and listmatrix::list_zerorow().
subroutine solverutils::zerorow | ( | type(matrix_t) | A, |
integer | n | ||
) |
Zeros a row in matrix.
a | Structure holding the matrix |
n | Row to be zerored. |
References bandmatrix::band_zerorow(), crsmatrix::crs_zerorow(), and listmatrix::list_zerorow().
Referenced by acousticssolver(), defutils::defaultdirichletbcs(), dosolve(), epsilonwall(), freesurfacesolver(), kesolver(), komegawalllaw(), nullifyedgedofs(), omegawall(), outletcompute(), pressuresolver(), setboundaryconditions(), setdirichletboundaries(), setdirichletpoint(), setdirichletpoints(), setelementvalues(), setlimitervalues(), setperiodicboundariespass1(), setperiodicboundariespass2(), setpointvalues(), stokessolver(), and streamsolver().