Octopus
|
This modules provides the routines for solving Ax=b using the V-shaped multigrid method. More...
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_v_cycle (this, der, op, sol, rhs) |
Performs one cycle of a V-shaped multigrid solver. More... | |
recursive subroutine, public | multigrid_solver_w_cycle (this, der, op, sol, rhs) |
Performs one cycle of a W-shaped multigrid solver. More... | |
subroutine, public | multigrid_iterative_solver (this, namespace, der, op, sol, rhs, multigrid_shape) |
An iterative multigrid solver. More... | |
recursive subroutine, public | multigrid_fmg_solver (this, namespace, der, op, sol, rhs) |
Full multigrid (FMG) solver. More... | |
subroutine | multigrid_solver_solve_coarsest (this, der, op, sol, rhs, residue) |
Computes the solution on the coarsest grid. More... | |
subroutine | get_residual (op, der, sol, rhs, residue) |
Computes the residual. 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 | weighted_jacobi = 2 |
integer, parameter, public | mg_v_shape = 1 |
integer, parameter, public | mg_w_shape = 2 |
integer, parameter, public | mg_fmg = 3 |
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 172 of file multigrid_solver.F90.
recursive subroutine, public multigrid_solver_oct_m::multigrid_solver_v_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
[in] | op | Linear operator |
[in,out] | sol | Solution to the problem |
[in] | rhs | Right-hand side of the linear problem |
Definition at line 273 of file multigrid_solver.F90.
recursive subroutine, public multigrid_solver_oct_m::multigrid_solver_w_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 W-shaped multigrid solver.
This method is called recursively from the finest grid to the coarsest and then back to the finest grid
[in] | op | Linear operator |
[in,out] | sol | Solution to the problem |
[in] | rhs | Right-hand side of the linear problem |
Definition at line 343 of file multigrid_solver.F90.
subroutine, public multigrid_solver_oct_m::multigrid_iterative_solver | ( | type(mg_solver_t), intent(in) | this, |
type(namespace_t), intent(in) | namespace, | ||
type(derivatives_t), intent(in) | der, | ||
type(nl_operator_t), intent(in) | op, | ||
real(real64), dimension(:), intent(inout), contiguous | sol, | ||
real(real64), dimension(:), intent(inout), contiguous | rhs, | ||
integer, intent(in) | multigrid_shape | ||
) |
An iterative multigrid solver.
It performs multiple V- or W-cycles up to convergence
[in] | op | Linear operator |
[in,out] | sol | Solution to the problem |
[in,out] | rhs | Right-hand side of the linear problem |
[in] | multigrid_shape | The shape of each cycle |
Definition at line 442 of file multigrid_solver.F90.
recursive subroutine, public multigrid_solver_oct_m::multigrid_fmg_solver | ( | type(mg_solver_t), intent(in) | this, |
type(namespace_t), intent(in) | namespace, | ||
type(derivatives_t), intent(in) | der, | ||
type(nl_operator_t), intent(in) | op, | ||
real(real64), dimension(:), intent(inout), contiguous | sol, | ||
real(real64), dimension(:), intent(inout), contiguous | rhs | ||
) |
Full multigrid (FMG) solver.
There is no starting point needed in this case. The code does N V cycles at each level of the full multigrid, in order to reach convergence at each level
[in] | op | Linear operator |
[in,out] | sol | Solution to the problem |
[in,out] | rhs | Right-hand side of the linear problem |
Definition at line 505 of file multigrid_solver.F90.
|
private |
Computes the solution on the coarsest grid.
[in] | op | Linear operator |
[in,out] | sol | Solution to the problem |
[in] | rhs | Right-hand side of the linear problem |
[in,out] | residue | A work array for the residue |
Definition at line 561 of file multigrid_solver.F90.
|
private |
Computes the residual.
Definition at line 596 of file multigrid_solver.F90.
|
private |
Given a nonlocal operator op, perform the relaxation operator.
This is needed to solve the linear problem Op sol = rhs steps times
[in] | op | Linear operator |
[in,out] | sol | Solution to the problem |
[in] | rhs | Right-hand side of the linear problem |
[in] | steps | Number of steps to be performed |
Definition at line 618 of file multigrid_solver.F90.
integer, parameter multigrid_solver_oct_m::gauss_seidel = 1 |
Definition at line 138 of file multigrid_solver.F90.
integer, parameter multigrid_solver_oct_m::weighted_jacobi = 2 |
Definition at line 138 of file multigrid_solver.F90.
integer, parameter, public multigrid_solver_oct_m::mg_v_shape = 1 |
Definition at line 164 of file multigrid_solver.F90.
integer, parameter, public multigrid_solver_oct_m::mg_w_shape = 2 |
Definition at line 164 of file multigrid_solver.F90.
integer, parameter, public multigrid_solver_oct_m::mg_fmg = 3 |
Definition at line 164 of file multigrid_solver.F90.