Octopus
derivatives.F90 File Reference

Go to the source code of this file.

Modules

module  derivatives_oct_m
 This module calculates the derivatives (gradients, Laplacians, etc.) of a function.
 

Data Types

type  derivatives_oct_m::derivatives_t
 class representing derivatives More...
 
type  derivatives_oct_m::derivatives_handle_batch_t
 handle to transfer data from the start() to finish() calls. More...
 

Functions/Subroutines

subroutine, public derivatives_oct_m::derivatives_init (der, namespace, space, coord_system, order)
 
subroutine, public derivatives_oct_m::derivatives_end (der)
 
subroutine derivatives_oct_m::derivatives_get_stencil_lapl (der, space, coord_system)
 
subroutine, public derivatives_oct_m::derivatives_lapl_diag (der, lapl)
 Returns the diagonal elements of the Laplacian, needed for preconditioning. More...
 
subroutine derivatives_oct_m::derivatives_get_stencil_grad (der)
 
subroutine, public derivatives_oct_m::derivatives_build (der, namespace, space, mesh, qvector, regenerate, verbose)
 build the derivatives object: More...
 
subroutine stencil_stars_pol_grad (stencil_type, dim, direction, order, polynomials)
 
subroutine stencil_stars_pol_lapl (stencil_type, stencil, dim, order, polynomials)
 
subroutine derivatives_oct_m::get_rhs_lapl (der, polynomials, rhs)
 
subroutine derivatives_oct_m::get_rhs_grad (der, polynomials, dir, rhs)
 
subroutine derivatives_oct_m::derivatives_make_discretization (namespace, dim, periodic_dim, mesh, masses, pol, rhs, nderiv, op, name, verbose)
 
logical function derivatives_oct_m::derivatives_overlap (this)
 
subroutine, public derivatives_oct_m::derivatives_get_lapl (this, namespace, op, space, name, order)
 
logical function, dimension(1:this%mesh%np), public derivatives_oct_m::derivatives_get_inner_boundary_mask (this)
 This function tells whether a point in the grid is contained in a layer of the width of the stencil between the last row of points in the grid. More...
 
real(real64) function, public derivatives_oct_m::derivatives_lapl_get_max_eigenvalue (this)
 Get maximum eigenvalue of discrete Laplacian. For the star and star_general stencils, use the Fourier transform of the stencil evaluated at the maximum phase to get an upper bound on the spectrum. For all other stencils, use the upper bound from the continuum. More...
 
subroutine, public derivatives_oct_m::dderivatives_perform (op, der, ff, op_ff, ghost_update, set_bc, factor)
 apply a nl_operator to a mesh function More...
 
subroutine, public derivatives_oct_m::dderivatives_lapl (der, ff, op_ff, ghost_update, set_bc, factor)
 apply the Laplacian to a mesh function More...
 
subroutine, public derivatives_oct_m::dderivatives_grad (der, ff, op_ff, ghost_update, set_bc, to_cartesian)
 apply the gradient to a mesh function More...
 
subroutine, public derivatives_oct_m::dderivatives_partial (der, ff, op_ff, dir, ghost_update, set_bc)
 apply the partial derivative along dir to a mesh function More...
 
subroutine, public derivatives_oct_m::dderivatives_div (der, ff, op_ff, ghost_update, set_bc, to_cartesian)
 apply the divergence operator to a vector of mesh functions More...
 
subroutine, public derivatives_oct_m::dderivatives_curl (der, ff, op_ff, ghost_update, set_bc)
 apply the curl operator to a vector of mesh functions More...
 
subroutine, public derivatives_oct_m::dderivatives_test (this, namespace, repetitions, min_blocksize, max_blocksize)
 unit test for derivatives More...
 
subroutine, public derivatives_oct_m::dderivatives_batch_start (op, der, ff, opff, handle, ghost_update, set_bc, factor)
 apply a non-local operator to a batch (1st part) More...
 
subroutine, public derivatives_oct_m::dderivatives_batch_finish (handle, async)
 apply a non-local operator to a batch (2nd part) More...
 
subroutine, public derivatives_oct_m::dderivatives_batch_perform (op, der, ff, opff, ghost_update, set_bc, factor, async)
 apply an operator to a bach of mesh functions More...
 
subroutine, public derivatives_oct_m::dderivatives_batch_grad (der, ffb, opffb, ghost_update, set_bc, to_cartesian, metric, factor)
 apply the gradient to a batch of mesh functions More...
 
subroutine derivatives_oct_m::dbatch_vector_uvw_to_xyz (der, coord_system, uvw, xyz, metric)
 transform a vector of batches from affine to cartesian coordinates More...
 
subroutine uvw_to_xyz_opencl
 
subroutine, public derivatives_oct_m::dderivatives_batch_curl (der, ffb, ghost_update, set_bc)
 apply the curl to a batch of mesh functions More...
 
subroutine, public derivatives_oct_m::dderivatives_batch_curl_from_gradient (der, ffb, gradb)
 calculate the curl from a batch and its gradient More...
 
subroutine, public derivatives_oct_m::dderivatives_batch_div (der, ffb, opffb, ghost_update, set_bc, to_cartesian)
 calculate the divergence of a vector of batches More...
 
subroutine, public derivatives_oct_m::zderivatives_perform (op, der, ff, op_ff, ghost_update, set_bc, factor)
 apply a nl_operator to a mesh function More...
 
subroutine, public derivatives_oct_m::zderivatives_lapl (der, ff, op_ff, ghost_update, set_bc, factor)
 apply the Laplacian to a mesh function More...
 
subroutine, public derivatives_oct_m::zderivatives_grad (der, ff, op_ff, ghost_update, set_bc, to_cartesian)
 apply the gradient to a mesh function More...
 
subroutine, public derivatives_oct_m::zderivatives_partial (der, ff, op_ff, dir, ghost_update, set_bc)
 apply the partial derivative along dir to a mesh function More...
 
subroutine, public derivatives_oct_m::zderivatives_div (der, ff, op_ff, ghost_update, set_bc, to_cartesian)
 apply the divergence operator to a vector of mesh functions More...
 
subroutine, public derivatives_oct_m::zderivatives_curl (der, ff, op_ff, ghost_update, set_bc)
 apply the curl operator to a vector of mesh functions More...
 
subroutine, public derivatives_oct_m::zderivatives_test (this, namespace, repetitions, min_blocksize, max_blocksize)
 unit test for derivatives More...
 
subroutine, public derivatives_oct_m::zderivatives_batch_start (op, der, ff, opff, handle, ghost_update, set_bc, factor)
 apply a non-local operator to a batch (1st part) More...
 
subroutine, public derivatives_oct_m::zderivatives_batch_finish (handle, async)
 apply a non-local operator to a batch (2nd part) More...
 
subroutine, public derivatives_oct_m::zderivatives_batch_perform (op, der, ff, opff, ghost_update, set_bc, factor, async)
 apply an operator to a bach of mesh functions More...
 
subroutine, public derivatives_oct_m::zderivatives_batch_grad (der, ffb, opffb, ghost_update, set_bc, to_cartesian, metric, factor)
 apply the gradient to a batch of mesh functions More...
 
subroutine derivatives_oct_m::zbatch_vector_uvw_to_xyz (der, coord_system, uvw, xyz, metric)
 transform a vector of batches from affine to cartesian coordinates More...
 
subroutine, public derivatives_oct_m::zderivatives_batch_curl (der, ffb, ghost_update, set_bc)
 apply the curl to a batch of mesh functions More...
 
subroutine, public derivatives_oct_m::zderivatives_batch_curl_from_gradient (der, ffb, gradb)
 calculate the curl from a batch and its gradient More...
 
subroutine, public derivatives_oct_m::zderivatives_batch_div (der, ffb, opffb, ghost_update, set_bc, to_cartesian)
 calculate the divergence of a vector of batches More...
 

Variables

integer, parameter derivatives_oct_m::der_bc_zero_f = 0
 function is zero at the boundaries More...
 
integer, parameter derivatives_oct_m::der_bc_zero_df = 1
 first derivative of the function is zero More...
 
integer, parameter derivatives_oct_m::der_bc_period = 2
 boundary is periodic More...
 
integer, parameter, public derivatives_oct_m::der_star = 1
 
integer, parameter, public derivatives_oct_m::der_variational = 2
 
integer, parameter, public derivatives_oct_m::der_cube = 3
 
integer, parameter, public derivatives_oct_m::der_starplus = 4
 
integer, parameter, public derivatives_oct_m::der_stargeneral = 5
 
integer, parameter derivatives_oct_m::blocking = 1
 
integer, parameter derivatives_oct_m::non_blocking = 2
 
type(accel_kernel_t) derivatives_oct_m::kernel_uvw_xyz
 
type(accel_kernel_t) derivatives_oct_m::kernel_dcurl
 
type(accel_kernel_t) derivatives_oct_m::kernel_zcurl
 

Function/Subroutine Documentation

◆ stencil_stars_pol_grad()

subroutine derivatives_build::stencil_stars_pol_grad ( integer, intent(in)  stencil_type,
integer, intent(in)  dim,
integer, intent(in)  direction,
integer, intent(in)  order,
integer, dimension(:, :), intent(inout)  polynomials 
)
private

Definition at line 703 of file derivatives.F90.

◆ stencil_stars_pol_lapl()

subroutine derivatives_build::stencil_stars_pol_lapl ( integer, intent(in)  stencil_type,
type(stencil_t), intent(in)  stencil,
integer, intent(in)  dim,
integer, intent(in)  order,
integer, dimension(:, :), intent(inout)  polynomials 
)
private

Definition at line 718 of file derivatives.F90.

◆ uvw_to_xyz_opencl()

subroutine uvw_to_xyz_opencl
private

Definition at line 1959 of file derivatives.F90.