SELF_RefinementIndicator_2D Module


Uses

  • module~~self_refinementindicator_2d~~UsesGraph module~self_refinementindicator_2d SELF_RefinementIndicator_2D iso_c_binding iso_c_binding module~self_refinementindicator_2d->iso_c_binding module~self_refinementindicator_2d_t SELF_RefinementIndicator_2D_t module~self_refinementindicator_2d->module~self_refinementindicator_2d_t module~self_constants SELF_Constants module~self_refinementindicator_2d->module~self_constants module~self_scalar_2d SELF_Scalar_2D module~self_refinementindicator_2d->module~self_scalar_2d module~self_gpu~2 SELF_GPU module~self_refinementindicator_2d->module~self_gpu~2 module~self_gpuinterfaces SELF_GPUInterfaces module~self_refinementindicator_2d->module~self_gpuinterfaces module~self_refinementindicator_2d_t->iso_c_binding module~self_refinementindicator_2d_t->module~self_constants module~self_refinementindicator_2d_t->module~self_scalar_2d module~self_lagrange SELF_Lagrange module~self_refinementindicator_2d_t->module~self_lagrange module~self_constants->iso_c_binding iso_fortran_env iso_fortran_env module~self_constants->iso_fortran_env module~self_scalar_2d->iso_c_binding module~self_scalar_2d->module~self_constants module~self_scalar_2d_t SELF_Scalar_2D_t module~self_scalar_2d->module~self_scalar_2d_t module~self_gpu~2->iso_c_binding module~self_gpu_enums~2 SELF_GPU_enums module~self_gpu~2->module~self_gpu_enums~2 module~self_gpuinterfaces->iso_c_binding module~self_gpuinterfaces->module~self_gpu~2 module~self_lagrange->iso_c_binding module~self_lagrange->module~self_constants module~self_lagrange->iso_fortran_env module~self_lagrange_t SELF_Lagrange_t module~self_lagrange->module~self_lagrange_t module~self_scalar_2d_t->iso_c_binding module~self_scalar_2d_t->module~self_constants module~self_scalar_2d_t->module~self_lagrange FEQParse FEQParse module~self_scalar_2d_t->FEQParse HDF5 HDF5 module~self_scalar_2d_t->HDF5 module~self_data SELF_Data module~self_scalar_2d_t->module~self_data module~self_datapool SELF_DataPool module~self_scalar_2d_t->module~self_datapool module~self_metadata SELF_Metadata module~self_scalar_2d_t->module~self_metadata module~self_hdf5 SELF_HDF5 module~self_scalar_2d_t->module~self_hdf5 module~self_gpu_enums~2->iso_c_binding module~self_lagrange_t->iso_c_binding module~self_lagrange_t->module~self_constants module~self_lagrange_t->iso_fortran_env module~self_lagrange_t->HDF5 module~self_lagrange_t->module~self_hdf5 module~self_quadrature SELF_Quadrature module~self_lagrange_t->module~self_quadrature module~self_supportroutines SELF_SupportRoutines module~self_lagrange_t->module~self_supportroutines module~self_data->iso_c_binding module~self_data->module~self_constants module~self_data->module~self_lagrange module~self_data->FEQParse module~self_data->HDF5 module~self_data->module~self_metadata module~self_data->module~self_hdf5 module~self_datapool->module~self_constants module~self_metadata->HDF5 module~self_metadata->module~self_hdf5 module~self_hdf5->module~self_constants module~self_hdf5->iso_fortran_env module~self_hdf5->HDF5 mpi mpi module~self_hdf5->mpi module~self_quadrature->module~self_constants module~self_quadrature->iso_fortran_env module~self_supportroutines->module~self_constants module~self_supportroutines->iso_fortran_env

Contents


Derived Types

Components

TypeVisibilityAttributesNameInitial
integer, public :: N =0

Polynomial degree of the interpolant the indicator is built for.

real(kind=prec), public, pointer, contiguous, dimension(:,:):: Pmodal=> null()

Nodal-to-modal transform. Pmodal(ii,p) is the (p,ii) entry of the inverse Legendre Vandermonde in the L2-normalized basis, so the 1-D modal coefficients are uhat(p) = sum_ii Pmodal(ii,p) * u(ii) (first index summed, SELF matrix convention).

type(c_ptr), public :: Pmodal_gpu =c_null_ptr
character(len=3), public :: backend ="gpu"
real(kind=prec), public :: coarsenThreshold =0.0_prec

Elements with sigma_e below this value are flagged SELF_AMR_COARSEN.

integer, public, pointer, contiguous, dimension(:):: flag=> null()

Per-element refinement flag: SELF_AMR_REFINE / SELF_AMR_KEEP / SELF_AMR_COARSEN.

type(c_ptr), public :: flag_gpu =c_null_ptr
real(kind=prec), public, pointer, contiguous, dimension(:):: indicator=> null()

Per-element indicator value sigma_e = log10(S_e).

type(c_ptr), public :: indicator_gpu =c_null_ptr
integer, public :: nElem =0

Number of (rank-local) elements the indicator arrays are sized for.

real(kind=prec), public :: refineThreshold =0.0_prec

Elements with sigma_e above this value are flagged SELF_AMR_REFINE.

Type-Bound Procedures

procedure, public :: CountFlagged => CountFlagged_RefinementIndicator2D_t
procedure, public :: Estimate => Estimate_RefinementIndicator2D
procedure, public :: Free => Free_RefinementIndicator2D
procedure, public :: Init => Init_RefinementIndicator2D
procedure, public :: SetThresholds => SetThresholds_RefinementIndicator2D_t
procedure, public :: UpdateDevice => UpdateDevice_RefinementIndicator2D
procedure, public :: UpdateHost => UpdateHost_RefinementIndicator2D

Subroutines

public subroutine Estimate_RefinementIndicator2D(this, solution, ivar)

GPU path: one device thread per element computes the modal transform and energy ratios, writes the indicator and flag on device, then copies both back to the host so the (host-side) mesh-adaptation logic can consume them directly.

Arguments

TypeIntentOptionalAttributesName
class(RefinementIndicator2D), intent(inout) :: this
class(Scalar2D), intent(in) :: solution
integer, intent(in) :: ivar

public subroutine Free_RefinementIndicator2D(this)

Arguments

TypeIntentOptionalAttributesName
class(RefinementIndicator2D), intent(inout) :: this

public subroutine Init_RefinementIndicator2D(this, interp, nElem, refineThreshold, coarsenThreshold)

Arguments

TypeIntentOptionalAttributesName
class(RefinementIndicator2D), intent(out) :: this
type(Lagrange), intent(in), target:: interp
integer, intent(in) :: nElem
real(kind=prec), intent(in) :: refineThreshold
real(kind=prec), intent(in) :: coarsenThreshold

public subroutine UpdateDevice_RefinementIndicator2D(this)

Arguments

TypeIntentOptionalAttributesName
class(RefinementIndicator2D), intent(inout) :: this

public subroutine UpdateHost_RefinementIndicator2D(this)

Arguments

TypeIntentOptionalAttributesName
class(RefinementIndicator2D), intent(inout) :: this