Octopus
multigrid_solver_oct_m Module Reference

This modules provides the routines for solving Ax=b using the V-shaped multigrid method. More...

Detailed Description

This modules provides the routines for solving Ax=b using the V-shaped multigrid method.

Data Types

type  mg_solver_t
 

Functions/Subroutines

subroutine, public multigrid_solver_init (this, namespace, space, mesh, thr)
 
recursive subroutine, public multigrid_solver_cycle (this, der, op, sol, rhs)
 Performs one cycle of a V-shaped multigrid solver. More...
 
subroutine multigrid_relax (this, mesh, der, op, sol, rhs, steps)
 Given a nonlocal operator op, perform the relaxation operator. More...
 

Variables

integer, parameter gauss_seidel = 1
 
integer, parameter gauss_jacobi = 2
 

Function/Subroutine Documentation

◆ multigrid_solver_init()

subroutine, public multigrid_solver_oct_m::multigrid_solver_init ( type(mg_solver_t), intent(out)  this,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
type(mesh_t), intent(inout)  mesh,
real(real64), intent(in)  thr 
)

Definition at line 163 of file multigrid_solver.F90.

◆ multigrid_solver_cycle()

recursive subroutine, public multigrid_solver_oct_m::multigrid_solver_cycle ( type(mg_solver_t), intent(in)  this,
type(derivatives_t), intent(in)  der,
type(nl_operator_t), intent(in)  op,
real(real64), dimension(:), intent(inout), contiguous  sol,
real(real64), dimension(:), intent(in), contiguous  rhs 
)

Performs one cycle of a V-shaped multigrid solver.

This method is called recursively from the finest grid to the coarsest and then back to the finest grid

Parameters
[in]opLinear operator
[in,out]solSolution to the problem
[in]rhsRight-hand side of the linear problem

Definition at line 267 of file multigrid_solver.F90.

◆ multigrid_relax()

subroutine multigrid_solver_oct_m::multigrid_relax ( type(mg_solver_t), intent(in)  this,
type(mesh_t), intent(in)  mesh,
type(derivatives_t), intent(in)  der,
type(nl_operator_t), intent(in)  op,
real(real64), dimension(:), intent(inout), contiguous  sol,
real(real64), dimension(:), intent(in), contiguous  rhs,
integer, intent(in)  steps 
)
private

Given a nonlocal operator op, perform the relaxation operator.

This is needed to solve the linear problem Op sol = rhs

Parameters
[in]opLinear operator
[in,out]solSolution to the problem
[in]rhsRight-hand side of the linear problem
[in]stepsNumber of steps to be performed

Definition at line 360 of file multigrid_solver.F90.

Variable Documentation

◆ gauss_seidel

integer, parameter multigrid_solver_oct_m::gauss_seidel = 1

Definition at line 137 of file multigrid_solver.F90.

◆ gauss_jacobi

integer, parameter multigrid_solver_oct_m::gauss_jacobi = 2

Definition at line 137 of file multigrid_solver.F90.