PAccX_m Module

Module for interfacing with PAccX. It's unclear whether this should remain here, or whether a Fortran interface should be provided by the PAccX package itself. TODO: If the module stays here, then the two parameters should be moved to the helmholtz_solver_m module, and the interfaces should be moved to the helmholtz_solver_gmgmres_cxx_s submodule.



Interfaces

public interface cxx_init

  • public function PAccX_CXX_init(so, backend, snp, mgrid_data, hmd) bind(c, name='paccx_solver_init')

    Arguments

    Type IntentOptional Attributes Name
    type(cxx_solver_objects), intent(out) :: so
    integer(kind=c_int32_t), intent(in), value :: backend
    type(solver_numerical_parameters), intent(in), value :: snp
    type(multigrid_data_t), intent(in) :: mgrid_data
    type(helmholtz_matrix_data), intent(in) :: hmd

    Return Value integer(kind=c_int32_t)

public interface cxx_update

  • public function PAccX_CXX_update(so, rhd) bind(c, name='paccx_solver_update')

    Arguments

    Type IntentOptional Attributes Name
    type(cxx_solver_objects), intent(inout) :: so
    type(helmholtz_matrix_data), intent(in) :: rhd

    Return Value integer(kind=c_int32_t)

public interface cxx_solve

  • public function PAccX_CXX_solve(so, hvd, Arnoldi_iterations, nrestarts, residuum) bind(c, name='paccx_solver_solve')

    Arguments

    Type IntentOptional Attributes Name
    type(cxx_solver_objects), intent(in) :: so
    type(helmholtz_vector_data) :: hvd
    integer(kind=c_int32_t), intent(out) :: Arnoldi_iterations
    integer(kind=c_int32_t), intent(out) :: nrestarts
    real(kind=c_double), intent(out) :: residuum

    Return Value integer(kind=c_int32_t)

public interface cxx_destroy

  • public function PAccX_CXX_destroy(so) bind(c, name='paccx_solver_destroy')

    Arguments

    Type IntentOptional Attributes Name
    type(cxx_solver_objects), intent(inout) :: so

    Return Value integer(kind=c_int32_t)

public interface cxx_debug_info

  • public function PAccX_CXX_debug_info(so) bind(c, name='paccx_solver_debug_info')

    Arguments

    Type IntentOptional Attributes Name
    type(cxx_solver_objects), intent(in) :: so

    Return Value integer(kind=c_int32_t)


Derived Types

type, public, bind(C) ::  solver_numerical_parameters

Holds solver numerical parameter information

Components

Type Visibility Attributes Name Initial
integer(kind=c_int32_t), public :: cycle_type

Type of multigrid cycle to use. Possible values are 0, 1, 2, 3, 4; these correspond to: V cycle non recursive, V cycle recursive, V cycle0, W cycle1 and F cycle. Please see PAccX/src/csr_solver/multigrid_solver/paccx_multigrid_cycle_type.hxx for further information

integer(kind=c_int32_t), public :: presmooth

Number of presmooth GSRB passes

integer(kind=c_int32_t), public :: postsmooth

Number of postsmooth GSRB passes

integer(kind=c_int32_t), public :: Krylov_dimension

Krylov dimension

integer(kind=c_int32_t), public :: max_restart

Maximum number of FGMRES restarts

real(kind=FP), public :: tolerance

Maximum accepted residuum

type, public, bind(C) ::  helmholtz_matrix_data

Holds information needed to build Helmholtz matrices for 2D problem.

Components

Type Visibility Attributes Name Initial
integer(kind=c_int32_t), public :: bnd_type_core
integer(kind=c_int32_t), public :: bnd_type_wall
integer(kind=c_int32_t), public :: bnd_type_dome
integer(kind=c_int32_t), public :: bnd_type_out
integer(kind=c_int32_t), public :: backend
type(c_ptr), public :: co
type(c_ptr), public :: xi
type(c_ptr), public :: lambda

type, public, bind(C) ::  helmholtz_vector_data

Holds right-hand-side of Helmholtz equation and initial guess for FGMRES algorithm

Components

Type Visibility Attributes Name Initial
integer(kind=c_int32_t), public :: backend
type(c_ptr), public :: rhs
type(c_ptr), public :: sol