From 9b24e4916a9c7efc0867df6a2834e8bac32961e9 Mon Sep 17 00:00:00 2001 From: Shiyu-Sandy-Du Date: Tue, 21 Jan 2025 11:10:26 +0100 Subject: [PATCH 01/10] isolate filters out of source term --- src/.depends | 26 ++++++++-------- src/Makefile.am | 30 +++++++++---------- .../brinkman => filter}/PDE_filter.f90 | 0 .../bcknd/cpu/filters_cpu.f90 | 0 .../bcknd/device/cuda/cuda_filters.f90 | 0 .../bcknd/device/cuda/filter_kernels.h | 0 .../bcknd/device/cuda/filters.cu | 0 .../bcknd/device/filters_device.F90 | 0 .../bcknd/device/hip/filter_kernels.h | 0 .../bcknd/device/hip/filters.hip | 0 .../bcknd/device/hip/hip_filters.f90 | 0 .../bcknd/device/opencl/filter_kernels.cl | 0 .../bcknd/device/opencl/filters.c | 0 .../bcknd/device/opencl/opencl_filters.f90 | 0 .../elementwise_filter.f90 | 0 .../brinkman => filter}/filter.f90 | 0 .../brinkman => filter}/filters.f90 | 0 17 files changed, 28 insertions(+), 28 deletions(-) rename src/{source_terms/brinkman => filter}/PDE_filter.f90 (100%) rename src/{source_terms => filter}/bcknd/cpu/filters_cpu.f90 (100%) rename src/{source_terms => filter}/bcknd/device/cuda/cuda_filters.f90 (100%) rename src/{source_terms => filter}/bcknd/device/cuda/filter_kernels.h (100%) rename src/{source_terms => filter}/bcknd/device/cuda/filters.cu (100%) rename src/{source_terms => filter}/bcknd/device/filters_device.F90 (100%) rename src/{source_terms => filter}/bcknd/device/hip/filter_kernels.h (100%) rename src/{source_terms => filter}/bcknd/device/hip/filters.hip (100%) rename src/{source_terms => filter}/bcknd/device/hip/hip_filters.f90 (100%) rename src/{source_terms => filter}/bcknd/device/opencl/filter_kernels.cl (100%) rename src/{source_terms => filter}/bcknd/device/opencl/filters.c (100%) rename src/{source_terms => filter}/bcknd/device/opencl/opencl_filters.f90 (100%) rename src/{source_terms/brinkman => filter}/elementwise_filter.f90 (100%) rename src/{source_terms/brinkman => filter}/filter.f90 (100%) rename src/{source_terms/brinkman => filter}/filters.f90 (100%) diff --git a/src/.depends b/src/.depends index 407e74e13320..f732a78585e0 100644 --- a/src/.depends +++ b/src/.depends @@ -302,16 +302,16 @@ source_terms/boussinesq_source_term.lo : source_terms/boussinesq_source_term.f90 source_terms/bcknd/cpu/boussinesq_source_term_cpu.lo : source_terms/bcknd/cpu/boussinesq_source_term_cpu.f90 math/math.lo field/field.lo field/field_list.lo config/num_types.lo source_terms/bcknd/device/boussinesq_source_term_device.lo : source_terms/bcknd/device/boussinesq_source_term_device.f90 math/bcknd/device/device_math.lo field/field.lo field/field_list.lo config/num_types.lo source_terms/source_term_fctry.lo : source_terms/source_term_fctry.f90 common/utils.lo common/json_utils.lo source_terms/coriolis_source_term.lo source_terms/brinkman_source_term.lo source_terms/boussinesq_source_term.lo source_terms/const_source_term.lo source_terms/source_term.lo -source_terms/brinkman_source_term.lo : source_terms/brinkman_source_term.f90 io/fld_file_output.lo source_terms/brinkman/PDE_filter.lo source_terms/brinkman/filter.lo common/utils.lo source_terms/source_term.lo math/signed_distance.lo common/profiler.lo mesh/point_zone_registry.lo mesh/point_zone.lo config/num_types.lo config/neko_config.lo mesh/tri_mesh.lo math/math.lo common/log.lo common/json_utils.lo io/file.lo source_terms/brinkman/filters.lo field/field_registry.lo math/field_math.lo field/field_list.lo field/field.lo math/bcknd/device/device_math.lo device/device.lo sem/coef.lo mesh/search_tree/aabb.lo -source_terms/brinkman/filters.lo : source_terms/brinkman/filters.f90 source_terms/bcknd/device/filters_device.lo source_terms/bcknd/cpu/filters_cpu.lo common/utils.lo config/num_types.lo config/neko_config.lo field/field.lo -source_terms/brinkman/filter.lo : source_terms/brinkman/filter.f90 field/field.lo common/json_utils.lo sem/coef.lo config/num_types.lo -source_terms/brinkman/PDE_filter.lo : source_terms/brinkman/PDE_filter.f90 math/bcknd/device/device_math.lo common/utils.lo krylov/pc_hsmg.lo krylov/bcknd/sx/pc_jacobi_sx.lo krylov/bcknd/device/pc_jacobi_device.lo krylov/bcknd/cpu/pc_jacobi.lo sem/dofmap.lo config/neko_config.lo common/log.lo math/field_math.lo field/scratch_registry.lo source_terms/brinkman/filter.lo mesh/mesh.lo fluid/pnpn_res.lo gs/gather_scatter.lo common/profiler.lo bc/neumann.lo bc/bc_list.lo krylov/precon.lo krylov/krylov.lo math/ax.lo sem/coef.lo field/field.lo field/field_registry.lo common/json_utils.lo config/num_types.lo -source_terms/brinkman/elementwise_filter.lo : source_terms/brinkman/elementwise_filter.f90 math/bcknd/device/device_math.lo device/device.lo math/tensor.lo math/mxm_wrapper.lo math/matrix.lo sem/speclib.lo common/json_utils.lo config/neko_config.lo common/utils.lo sem/coef.lo field/field.lo math/math.lo source_terms/brinkman/filter.lo config/num_types.lo -source_terms/bcknd/cpu/filters_cpu.lo : source_terms/bcknd/cpu/filters_cpu.f90 config/num_types.lo -source_terms/bcknd/device/filters_device.lo : source_terms/bcknd/device/filters_device.F90 source_terms/bcknd/device/opencl/opencl_filters.lo source_terms/bcknd/device/hip/hip_filters.lo source_terms/bcknd/device/cuda/cuda_filters.lo common/utils.lo math/bcknd/device/device_math.lo config/num_types.lo -source_terms/bcknd/device/cuda/cuda_filters.lo : source_terms/bcknd/device/cuda/cuda_filters.f90 config/num_types.lo -source_terms/bcknd/device/hip/hip_filters.lo : source_terms/bcknd/device/hip/hip_filters.f90 config/num_types.lo -source_terms/bcknd/device/opencl/opencl_filters.lo : source_terms/bcknd/device/opencl/opencl_filters.f90 config/num_types.lo +source_terms/brinkman_source_term.lo : source_terms/brinkman_source_term.f90 io/fld_file_output.lo filter/PDE_filter.lo filter/filter.lo common/utils.lo source_terms/source_term.lo math/signed_distance.lo common/profiler.lo mesh/point_zone_registry.lo mesh/point_zone.lo config/num_types.lo config/neko_config.lo mesh/tri_mesh.lo math/math.lo common/log.lo common/json_utils.lo io/file.lo filter/filters.lo field/field_registry.lo math/field_math.lo field/field_list.lo field/field.lo math/bcknd/device/device_math.lo device/device.lo sem/coef.lo mesh/search_tree/aabb.lo +filter/filters.lo : filter/filters.f90 filter/bcknd/device/filters_device.lo filter/bcknd/cpu/filters_cpu.lo common/utils.lo config/num_types.lo config/neko_config.lo field/field.lo +filter/filter.lo : filter/filter.f90 field/field.lo common/json_utils.lo sem/coef.lo config/num_types.lo +filter/PDE_filter.lo : filter/PDE_filter.f90 math/bcknd/device/device_math.lo common/utils.lo krylov/pc_hsmg.lo krylov/bcknd/sx/pc_jacobi_sx.lo krylov/bcknd/device/pc_jacobi_device.lo krylov/bcknd/cpu/pc_jacobi.lo sem/dofmap.lo config/neko_config.lo common/log.lo math/field_math.lo field/scratch_registry.lo filter/filter.lo mesh/mesh.lo fluid/pnpn_res.lo gs/gather_scatter.lo common/profiler.lo bc/neumann.lo bc/bc_list.lo krylov/precon.lo krylov/krylov.lo math/ax.lo sem/coef.lo field/field.lo field/field_registry.lo common/json_utils.lo config/num_types.lo +filter/elementwise_filter.lo : filter/elementwise_filter.f90 math/bcknd/device/device_math.lo device/device.lo math/tensor.lo math/mxm_wrapper.lo math/matrix.lo sem/speclib.lo common/json_utils.lo config/neko_config.lo common/utils.lo sem/coef.lo field/field.lo math/math.lo filter/filter.lo config/num_types.lo +filter/bcknd/cpu/filters_cpu.lo : filter/bcknd/cpu/filters_cpu.f90 config/num_types.lo +filter/bcknd/device/filters_device.lo : filter/bcknd/device/filters_device.F90 filter/bcknd/device/opencl/opencl_filters.lo filter/bcknd/device/hip/hip_filters.lo filter/bcknd/device/cuda/cuda_filters.lo common/utils.lo math/bcknd/device/device_math.lo config/num_types.lo +filter/bcknd/device/cuda/cuda_filters.lo : filter/bcknd/device/cuda/cuda_filters.f90 config/num_types.lo +filter/bcknd/device/hip/hip_filters.lo : filter/bcknd/device/hip/hip_filters.f90 config/num_types.lo +filter/bcknd/device/opencl/opencl_filters.lo : filter/bcknd/device/opencl/opencl_filters.f90 config/num_types.lo les/les_model.lo : les/les_model.f90 math/bcknd/device/device_math.lo math/math.lo device/device.lo config/neko_config.lo gs/gs_ops.lo sem/coef.lo sem/dofmap.lo field/field_registry.lo field/field.lo config/num_types.lo les/les_model_fctry.lo : les/les_model_fctry.f90 common/utils.lo les/sigma.lo les/dynamic_smagorinsky.lo les/smagorinsky.lo les/vreman.lo les/les_model.lo les/vreman.lo : les/vreman.f90 common/log.lo sem/coef.lo les/bcknd/device/vreman_device.lo les/bcknd/cpu/vreman_cpu.lo config/neko_config.lo common/json_utils.lo sem/dofmap.lo les/les_model.lo config/num_types.lo @@ -322,9 +322,9 @@ les/smagorinsky.lo : les/smagorinsky.f90 common/log.lo sem/coef.lo les/bcknd/dev les/bcknd/cpu/smagorinsky_cpu.lo : les/bcknd/cpu/smagorinsky_cpu.f90 math/math.lo gs/gs_ops.lo sem/coef.lo math/operators.lo field/field.lo field/field_registry.lo field/scratch_registry.lo field/field_list.lo config/num_types.lo les/bcknd/device/smagorinsky_device.lo : les/bcknd/device/smagorinsky_device.f90 les/bcknd/device/device_smagorinsky_nut.lo math/bcknd/device/device_math.lo gs/gs_ops.lo sem/coef.lo math/operators.lo field/field.lo field/field_registry.lo field/scratch_registry.lo field/field_list.lo config/num_types.lo les/bcknd/device/device_smagorinsky_nut.lo : les/bcknd/device/device_smagorinsky_nut.F90 comm/comm.lo common/utils.lo config/num_types.lo -les/dynamic_smagorinsky.lo : les/dynamic_smagorinsky.f90 les/bcknd/device/dynamic_smagorinsky_device.lo common/log.lo les/bcknd/cpu/dynamic_smagorinsky_cpu.lo source_terms/brinkman/elementwise_filter.lo sem/coef.lo config/neko_config.lo common/utils.lo common/json_utils.lo sem/dofmap.lo les/les_model.lo field/field.lo field/field_list.lo math/math.lo config/num_types.lo -les/bcknd/cpu/dynamic_smagorinsky_cpu.lo : les/bcknd/cpu/dynamic_smagorinsky_cpu.f90 gs/gs_ops.lo source_terms/brinkman/elementwise_filter.lo sem/coef.lo math/operators.lo field/field.lo field/field_registry.lo field/scratch_registry.lo math/math.lo field/field_list.lo config/num_types.lo -les/bcknd/device/dynamic_smagorinsky_device.lo : les/bcknd/device/dynamic_smagorinsky_device.f90 les/bcknd/device/device_dynamic_smagorinsky_nut.lo math/bcknd/device/device_math.lo gs/gs_ops.lo source_terms/brinkman/elementwise_filter.lo sem/coef.lo math/operators.lo field/field.lo field/field_registry.lo field/scratch_registry.lo field/field_list.lo config/num_types.lo +les/dynamic_smagorinsky.lo : les/dynamic_smagorinsky.f90 les/bcknd/device/dynamic_smagorinsky_device.lo common/log.lo les/bcknd/cpu/dynamic_smagorinsky_cpu.lo filter/elementwise_filter.lo sem/coef.lo config/neko_config.lo common/utils.lo common/json_utils.lo sem/dofmap.lo les/les_model.lo field/field.lo field/field_list.lo math/math.lo config/num_types.lo +les/bcknd/cpu/dynamic_smagorinsky_cpu.lo : les/bcknd/cpu/dynamic_smagorinsky_cpu.f90 gs/gs_ops.lo filter/elementwise_filter.lo sem/coef.lo math/operators.lo field/field.lo field/field_registry.lo field/scratch_registry.lo math/math.lo field/field_list.lo config/num_types.lo +les/bcknd/device/dynamic_smagorinsky_device.lo : les/bcknd/device/dynamic_smagorinsky_device.f90 les/bcknd/device/device_dynamic_smagorinsky_nut.lo math/bcknd/device/device_math.lo gs/gs_ops.lo filter/elementwise_filter.lo sem/coef.lo math/operators.lo field/field.lo field/field_registry.lo field/scratch_registry.lo field/field_list.lo config/num_types.lo les/bcknd/device/device_dynamic_smagorinsky_nut.lo : les/bcknd/device/device_dynamic_smagorinsky_nut.F90 comm/comm.lo common/utils.lo config/num_types.lo les/sigma.lo : les/sigma.f90 common/log.lo sem/coef.lo les/bcknd/device/sigma_device.lo les/bcknd/cpu/sigma_cpu.lo config/neko_config.lo common/utils.lo common/json_utils.lo sem/dofmap.lo les/les_model.lo field/field.lo config/num_types.lo les/bcknd/cpu/sigma_cpu.lo : les/bcknd/cpu/sigma_cpu.f90 math/math.lo gs/gs_ops.lo sem/coef.lo math/operators.lo field/field.lo field/field_registry.lo field/scratch_registry.lo field/field_list.lo config/num_types.lo diff --git a/src/Makefile.am b/src/Makefile.am index 307a4a5bd944..7a43ea9ff0f7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -307,15 +307,15 @@ neko_fortran_SOURCES = \ source_terms/bcknd/device/boussinesq_source_term_device.f90\ source_terms/source_term_fctry.f90\ source_terms/brinkman_source_term.f90\ - source_terms/brinkman/filters.f90\ - source_terms/brinkman/filter.f90\ - source_terms/brinkman/PDE_filter.f90\ - source_terms/brinkman/elementwise_filter.f90\ - source_terms/bcknd/cpu/filters_cpu.f90\ - source_terms/bcknd/device/filters_device.F90\ - source_terms/bcknd/device/cuda/cuda_filters.f90\ - source_terms/bcknd/device/hip/hip_filters.f90\ - source_terms/bcknd/device/opencl/opencl_filters.f90\ + filter/filters.f90\ + filter/filter.f90\ + filter/PDE_filter.f90\ + filter/elementwise_filter.f90\ + filter/bcknd/cpu/filters_cpu.f90\ + filter/bcknd/device/filters_device.F90\ + filter/bcknd/device/cuda/cuda_filters.f90\ + filter/bcknd/device/hip/hip_filters.f90\ + filter/bcknd/device/opencl/opencl_filters.f90\ les/les_model.f90\ les/les_model_fctry.f90\ les/vreman.f90\ @@ -391,7 +391,7 @@ libneko_la_SOURCES += \ fluid/stress_formulation/bcknd/device/hip/pnpn_stress_res.hip\ scalar/bcknd/device/hip/scalar_residual.hip\ sem/bcknd/device/hip/coef.hip\ - source_terms/bcknd/device/hip/filters.hip\ + filter/bcknd/device/hip/filters.hip\ les/bcknd/device/hip/sigma_nut.hip\ les/bcknd/device/hip/vreman_nut.hip\ les/bcknd/device/hip/smagorinsky_nut.hip\ @@ -434,7 +434,7 @@ libneko_la_SOURCES += \ fluid/stress_formulation/bcknd/device/cuda/pnpn_stress_res.cu\ scalar/bcknd/device/cuda/scalar_residual.cu\ sem/bcknd/device/cuda/coef.cu\ - source_terms/bcknd/device/cuda/filters.cu\ + filter/bcknd/device/cuda/filters.cu\ les/bcknd/device/cuda/sigma_nut.cu\ les/bcknd/device/cuda/vreman_nut.cu\ les/bcknd/device/cuda/smagorinsky_nut.cu\ @@ -473,7 +473,7 @@ libneko_la_SOURCES += \ fluid/bcknd/device/opencl/pnpn_res.c\ scalar/bcknd/device/opencl/scalar_residual.c\ sem/bcknd/device/opencl/coef.c\ - source_terms/bcknd/device/opencl/filters.c + filter/bcknd/device/opencl/filters.c %.cl.h: %.cl bash ./scripts/cltostring.sh $< @@ -664,9 +664,9 @@ EXTRA_DIST = \ sem/bcknd/device/opencl/coef_kernel.cl\ math/bcknd/device/device_mpi_reduce.h\ math/bcknd/device/device_mpi_op.h\ - source_terms/bcknd/device/cuda/filter_kernels.h\ - source_terms/bcknd/device/hip/filter_kernels.h\ - source_terms/bcknd/device/opencl/filter_kernels.cl\ + filter/bcknd/device/cuda/filter_kernels.h\ + filter/bcknd/device/hip/filter_kernels.h\ + filter/bcknd/device/opencl/filter_kernels.cl\ device/opencl/jit.h\ device/opencl/prgm_lib.h\ device/opencl/check.h\ diff --git a/src/source_terms/brinkman/PDE_filter.f90 b/src/filter/PDE_filter.f90 similarity index 100% rename from src/source_terms/brinkman/PDE_filter.f90 rename to src/filter/PDE_filter.f90 diff --git a/src/source_terms/bcknd/cpu/filters_cpu.f90 b/src/filter/bcknd/cpu/filters_cpu.f90 similarity index 100% rename from src/source_terms/bcknd/cpu/filters_cpu.f90 rename to src/filter/bcknd/cpu/filters_cpu.f90 diff --git a/src/source_terms/bcknd/device/cuda/cuda_filters.f90 b/src/filter/bcknd/device/cuda/cuda_filters.f90 similarity index 100% rename from src/source_terms/bcknd/device/cuda/cuda_filters.f90 rename to src/filter/bcknd/device/cuda/cuda_filters.f90 diff --git a/src/source_terms/bcknd/device/cuda/filter_kernels.h b/src/filter/bcknd/device/cuda/filter_kernels.h similarity index 100% rename from src/source_terms/bcknd/device/cuda/filter_kernels.h rename to src/filter/bcknd/device/cuda/filter_kernels.h diff --git a/src/source_terms/bcknd/device/cuda/filters.cu b/src/filter/bcknd/device/cuda/filters.cu similarity index 100% rename from src/source_terms/bcknd/device/cuda/filters.cu rename to src/filter/bcknd/device/cuda/filters.cu diff --git a/src/source_terms/bcknd/device/filters_device.F90 b/src/filter/bcknd/device/filters_device.F90 similarity index 100% rename from src/source_terms/bcknd/device/filters_device.F90 rename to src/filter/bcknd/device/filters_device.F90 diff --git a/src/source_terms/bcknd/device/hip/filter_kernels.h b/src/filter/bcknd/device/hip/filter_kernels.h similarity index 100% rename from src/source_terms/bcknd/device/hip/filter_kernels.h rename to src/filter/bcknd/device/hip/filter_kernels.h diff --git a/src/source_terms/bcknd/device/hip/filters.hip b/src/filter/bcknd/device/hip/filters.hip similarity index 100% rename from src/source_terms/bcknd/device/hip/filters.hip rename to src/filter/bcknd/device/hip/filters.hip diff --git a/src/source_terms/bcknd/device/hip/hip_filters.f90 b/src/filter/bcknd/device/hip/hip_filters.f90 similarity index 100% rename from src/source_terms/bcknd/device/hip/hip_filters.f90 rename to src/filter/bcknd/device/hip/hip_filters.f90 diff --git a/src/source_terms/bcknd/device/opencl/filter_kernels.cl b/src/filter/bcknd/device/opencl/filter_kernels.cl similarity index 100% rename from src/source_terms/bcknd/device/opencl/filter_kernels.cl rename to src/filter/bcknd/device/opencl/filter_kernels.cl diff --git a/src/source_terms/bcknd/device/opencl/filters.c b/src/filter/bcknd/device/opencl/filters.c similarity index 100% rename from src/source_terms/bcknd/device/opencl/filters.c rename to src/filter/bcknd/device/opencl/filters.c diff --git a/src/source_terms/bcknd/device/opencl/opencl_filters.f90 b/src/filter/bcknd/device/opencl/opencl_filters.f90 similarity index 100% rename from src/source_terms/bcknd/device/opencl/opencl_filters.f90 rename to src/filter/bcknd/device/opencl/opencl_filters.f90 diff --git a/src/source_terms/brinkman/elementwise_filter.f90 b/src/filter/elementwise_filter.f90 similarity index 100% rename from src/source_terms/brinkman/elementwise_filter.f90 rename to src/filter/elementwise_filter.f90 diff --git a/src/source_terms/brinkman/filter.f90 b/src/filter/filter.f90 similarity index 100% rename from src/source_terms/brinkman/filter.f90 rename to src/filter/filter.f90 diff --git a/src/source_terms/brinkman/filters.f90 b/src/filter/filters.f90 similarity index 100% rename from src/source_terms/brinkman/filters.f90 rename to src/filter/filters.f90 From a8edd0b5ac00b66a931f3d48412ef596d0be4593 Mon Sep 17 00:00:00 2001 From: Shiyu-Sandy-Du Date: Mon, 27 Jan 2025 14:44:26 +0100 Subject: [PATCH 02/10] draft the initial documentation --- doc/pages/user-guide/filter.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 doc/pages/user-guide/filter.md diff --git a/doc/pages/user-guide/filter.md b/doc/pages/user-guide/filter.md new file mode 100644 index 000000000000..357d5608399d --- /dev/null +++ b/doc/pages/user-guide/filter.md @@ -0,0 +1,24 @@ +# Filter {#filter} + +\tableofcontents + +## Filter base type + +`filter_t` is a base type for filters on `field_t` by calling subroutine `filter_t%apply(F_out, F_in)`, where `F_out` and `F_in` are the output and the input fields, respectively. + +The derived type of `filter_t` includes `PDE_filter_t`, `elementwise_filter_t`, ... + +## PDE filter + +The PDE filter is defined in the derived type `PDE_filter_t`. ... + +## Elementwise filter + +The elementwise filter is defined in the derived type `elementwise_filter_t`. Basing on the spectral element discretization, it is performed by mapping the field into hierarchical polynomials element by element (currently only Legendre-like polynomials are supported) and then attenuating the kernel for different orders. It could be constructed by calling subroutine `elementwise_filter_t%init(json_t, coef_t, filter_type)` where `filter_type` is a string to specify the type of the polynomial. + +| Name | Polynomials | +| ---------------------------- | -------------------------- | +| `nonBoyd` | i-th order Legendre polynomials L_i(x) | +| `Boyd` | L_i(x) for i<2, L_i(x) - L_{i-2}(x) for i>=2| + +The kernel is defined through an array `real(kind=rp), allocatable :: trnsfr(:)` whose size is the number of polynomials. The indices of `elementwise_filter_t%trnsfr` corresponds to the polynomial order in ascending order. `elementwise_filter_t%trnsfr` is initialized to be all `1` such that the filter has no effect by default unless further defined. Once `elementwise_filter_t%trnsfr` is defined, one should call the subroutine `elementwise_filter_t%build_1d()` to settle the settings. One could also refer `dynamic_smagorinsky.f90` for an example of using `elementwise_filter_t`. \ No newline at end of file From b80545269abcf0e3bfed6c418dce6fdbadfa681c Mon Sep 17 00:00:00 2001 From: Shiyu-Sandy-Du Date: Mon, 27 Jan 2025 16:30:12 +0100 Subject: [PATCH 03/10] Leave the filter type specification to later stage other than json (considering the filter might be as test filter or the actual filter) --- doc/pages/user-guide/filter.md | 8 ++++++-- src/filter/elementwise_filter.f90 | 18 ++++++------------ src/filter/filter.f90 | 4 ---- src/les/dynamic_smagorinsky.f90 | 5 ++++- 4 files changed, 16 insertions(+), 19 deletions(-) diff --git a/doc/pages/user-guide/filter.md b/doc/pages/user-guide/filter.md index 357d5608399d..325f0cd87bd9 100644 --- a/doc/pages/user-guide/filter.md +++ b/doc/pages/user-guide/filter.md @@ -14,11 +14,15 @@ The PDE filter is defined in the derived type `PDE_filter_t`. ... ## Elementwise filter -The elementwise filter is defined in the derived type `elementwise_filter_t`. Basing on the spectral element discretization, it is performed by mapping the field into hierarchical polynomials element by element (currently only Legendre-like polynomials are supported) and then attenuating the kernel for different orders. It could be constructed by calling subroutine `elementwise_filter_t%init(json_t, coef_t, filter_type)` where `filter_type` is a string to specify the type of the polynomial. +The elementwise filter is defined in the derived type `elementwise_filter_t`. Basing on the spectral element discretization, it is performed by mapping the field into hierarchical polynomials element by element (currently only Legendre-like polynomials are supported) and then attenuating the kernel for different orders. It could be constructed by calling subroutine `elementwise_filter_t%init(json_t, coef_t)`. + +After constructing the object, one should also set up `elementwise_filter_t%elementwise_filter_type` and `elementwise_filter_t%trnsfr`. + +`elementwise_filter_type` is a string to specify the type of usage of the polynomial for the filter. | Name | Polynomials | | ---------------------------- | -------------------------- | -| `nonBoyd` | i-th order Legendre polynomials L_i(x) | +| `nonBoyd` | i-th order polynomials L_i(x) | | `Boyd` | L_i(x) for i<2, L_i(x) - L_{i-2}(x) for i>=2| The kernel is defined through an array `real(kind=rp), allocatable :: trnsfr(:)` whose size is the number of polynomials. The indices of `elementwise_filter_t%trnsfr` corresponds to the polynomial order in ascending order. `elementwise_filter_t%trnsfr` is initialized to be all `1` such that the filter has no effect by default unless further defined. Once `elementwise_filter_t%trnsfr` is defined, one should call the subroutine `elementwise_filter_t%build_1d()` to settle the settings. One could also refer `dynamic_smagorinsky.f90` for an example of using `elementwise_filter_t`. \ No newline at end of file diff --git a/src/filter/elementwise_filter.f90 b/src/filter/elementwise_filter.f90 index 3448bcb669a3..dcf3de7d72ae 100644 --- a/src/filter/elementwise_filter.f90 +++ b/src/filter/elementwise_filter.f90 @@ -57,7 +57,7 @@ module elementwise_filter type, public, extends(filter_t) :: elementwise_filter_t !> filter type: !> possible options: "Boyd", "nonBoyd" - character(len=:), allocatable :: filter_type + character(len=:), allocatable :: elementwise_filter_type !> dimension integer :: nx !> filtered wavenumber @@ -88,23 +88,17 @@ subroutine elementwise_filter_init_from_json(this, json, coef) class(elementwise_filter_t), intent(inout) :: this type(json_file), intent(inout) :: json type(coef_t), intent(in) :: coef - character(len=:), allocatable :: filter_type - - call json_get_or_default(json, "test_filter_type", filter_type, "nonBoyd") - this%filter_type = filter_type - + ! Filter assumes lx = ly = lz call this%init_base(json, coef) - call this%init_from_attributes(coef%dof%xh%lx, this%filter_type) + call this%init_from_attributes(coef%dof%xh%lx) end subroutine elementwise_filter_init_from_json !> Actual Constructor. !! @param nx number of points in an elements in one direction. - !! @param filter_type possible options: "Boyd", "nonBoyd" - subroutine elementwise_filter_init_from_attributes(this, nx, filter_type) + subroutine elementwise_filter_init_from_attributes(this, nx) class(elementwise_filter_t), intent(inout) :: this - character(len=*) :: filter_type integer :: nx this%nx = nx @@ -151,7 +145,7 @@ subroutine elementwise_filter_free(this) call device_free(this%fht_d) end if - this%filter_type = "" + this%elementwise_filter_type = "" this%nx = 0 this%nt = 0 @@ -164,7 +158,7 @@ subroutine build_1d(this) class(elementwise_filter_t), intent(inout) :: this call build_1d_cpu(this%fh, this%fht, this%trnsfr, & - this%nx, this%filter_type) + this%nx, this%elementwise_filter_type) if (NEKO_BCKND_DEVICE .eq. 1) then call device_memcpy(this%fh, this%fh_d, & this%nx * this%nx, HOST_TO_DEVICE, sync = .false.) diff --git a/src/filter/filter.f90 b/src/filter/filter.f90 index 508b3ba4863b..c318e418aac5 100644 --- a/src/filter/filter.f90 +++ b/src/filter/filter.f90 @@ -103,10 +103,6 @@ subroutine filter_init_base(this, json, coef) class(filter_t), intent(inout) :: this type(json_file), intent(inout) :: json type(coef_t), intent(in), target :: coef - character(len=:), allocatable :: compute_control, output_control - real(kind=rp) :: compute_value, output_value - integer :: order - this%coef => coef diff --git a/src/les/dynamic_smagorinsky.f90 b/src/les/dynamic_smagorinsky.f90 index 0fc9b0ebda0f..52ea1e1ccf18 100644 --- a/src/les/dynamic_smagorinsky.f90 +++ b/src/les/dynamic_smagorinsky.f90 @@ -90,6 +90,7 @@ subroutine dynamic_smagorinsky_init(this, dofmap, coef, json) character(len=:), allocatable :: nut_name integer :: i character(len=:), allocatable :: delta_type + character(len=:), allocatable :: filter_type character(len=LOG_SIZE) :: log_buf call json_get_or_default(json, "nut_field", nut_name, "nut") @@ -98,6 +99,8 @@ subroutine dynamic_smagorinsky_init(this, dofmap, coef, json) call this%free() call this%init_base(dofmap, coef, nut_name, delta_type) call this%test_filter%init(json, coef) + call json_get_or_default(json, "test_filter_type", filter_type, "nonBoyd") + this%test_filter%elementwise_filter_type = filter_type call set_ds_filt(this%test_filter) call neko_log%section('LES model') @@ -106,7 +109,7 @@ subroutine dynamic_smagorinsky_init(this, dofmap, coef, json) write(log_buf, '(A, A)') 'Delta evaluation : ', delta_type call neko_log%message(log_buf) write(log_buf, '(A, A)') 'Test filter type : ', & - this%test_filter%filter_type + this%test_filter%elementwise_filter_type call neko_log%message(log_buf) call neko_log%end_section() From 2140c1c08d65fc29b038624727a037e1b8c7ce35 Mon Sep 17 00:00:00 2001 From: Shiyu-Sandy-Du Date: Wed, 5 Feb 2025 14:16:51 +0100 Subject: [PATCH 04/10] add a fctry subroutine to initialize a general filter --- src/.depends | 1 + src/Makefile.am | 1 + src/filter/filter.f90 | 17 +++++++++ src/filter/filter_fctry.f90 | 75 +++++++++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+) create mode 100644 src/filter/filter_fctry.f90 diff --git a/src/.depends b/src/.depends index f732a78585e0..e02d2b88687d 100644 --- a/src/.depends +++ b/src/.depends @@ -305,6 +305,7 @@ source_terms/source_term_fctry.lo : source_terms/source_term_fctry.f90 common/ut source_terms/brinkman_source_term.lo : source_terms/brinkman_source_term.f90 io/fld_file_output.lo filter/PDE_filter.lo filter/filter.lo common/utils.lo source_terms/source_term.lo math/signed_distance.lo common/profiler.lo mesh/point_zone_registry.lo mesh/point_zone.lo config/num_types.lo config/neko_config.lo mesh/tri_mesh.lo math/math.lo common/log.lo common/json_utils.lo io/file.lo filter/filters.lo field/field_registry.lo math/field_math.lo field/field_list.lo field/field.lo math/bcknd/device/device_math.lo device/device.lo sem/coef.lo mesh/search_tree/aabb.lo filter/filters.lo : filter/filters.f90 filter/bcknd/device/filters_device.lo filter/bcknd/cpu/filters_cpu.lo common/utils.lo config/num_types.lo config/neko_config.lo field/field.lo filter/filter.lo : filter/filter.f90 field/field.lo common/json_utils.lo sem/coef.lo config/num_types.lo +filter/filter_fctry.lo : filter/filter_fctry.f90 common/utils.lo filter/PDE_filter.lo filter/elementwise_filter.lo filter/filter.lo filter/PDE_filter.lo : filter/PDE_filter.f90 math/bcknd/device/device_math.lo common/utils.lo krylov/pc_hsmg.lo krylov/bcknd/sx/pc_jacobi_sx.lo krylov/bcknd/device/pc_jacobi_device.lo krylov/bcknd/cpu/pc_jacobi.lo sem/dofmap.lo config/neko_config.lo common/log.lo math/field_math.lo field/scratch_registry.lo filter/filter.lo mesh/mesh.lo fluid/pnpn_res.lo gs/gather_scatter.lo common/profiler.lo bc/neumann.lo bc/bc_list.lo krylov/precon.lo krylov/krylov.lo math/ax.lo sem/coef.lo field/field.lo field/field_registry.lo common/json_utils.lo config/num_types.lo filter/elementwise_filter.lo : filter/elementwise_filter.f90 math/bcknd/device/device_math.lo device/device.lo math/tensor.lo math/mxm_wrapper.lo math/matrix.lo sem/speclib.lo common/json_utils.lo config/neko_config.lo common/utils.lo sem/coef.lo field/field.lo math/math.lo filter/filter.lo config/num_types.lo filter/bcknd/cpu/filters_cpu.lo : filter/bcknd/cpu/filters_cpu.f90 config/num_types.lo diff --git a/src/Makefile.am b/src/Makefile.am index 7a43ea9ff0f7..6c0eafe93817 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -309,6 +309,7 @@ neko_fortran_SOURCES = \ source_terms/brinkman_source_term.f90\ filter/filters.f90\ filter/filter.f90\ + filter/filter_fctry.f90\ filter/PDE_filter.f90\ filter/elementwise_filter.f90\ filter/bcknd/cpu/filters_cpu.f90\ diff --git a/src/filter/filter.f90 b/src/filter/filter.f90 index c318e418aac5..d13c293ed08b 100644 --- a/src/filter/filter.f90 +++ b/src/filter/filter.f90 @@ -97,6 +97,23 @@ subroutine filter_apply(this, F_out, F_in) end subroutine filter_apply end interface + interface + !> Filter factory. Both constructs and initializes the object. + !! @param object The object to be allocated. + !! @param type_name The name of the filter. + !! @param json A dictionary with parameters. + !! @param coef SEM coefficients. + module subroutine filter_factory(object, type_name, json, coef) + class(filter_t), allocatable, intent(inout) :: object + character(len=*), intent(in) :: type_name + type(coef_t), intent(in) :: coef + type(json_file), intent(inout) :: json + character(len=:), allocatable :: type_string + end subroutine filter_factory + end interface + + ! public :: filter_factory + contains !> Constructor for the `filter_t` (base) class. subroutine filter_init_base(this, json, coef) diff --git a/src/filter/filter_fctry.f90 b/src/filter/filter_fctry.f90 new file mode 100644 index 000000000000..e0be3078ef51 --- /dev/null +++ b/src/filter/filter_fctry.f90 @@ -0,0 +1,75 @@ +! Copyright (c) 2025, The Neko Authors +! All rights reserved. +! +! Redistribution and use in source and binary forms, with or without +! modification, are permitted provided that the following conditions +! are met: +! +! * Redistributions of source code must retain the above copyright +! notice, this list of conditions and the following disclaimer. +! +! * Redistributions in binary form must reproduce the above +! copyright notice, this list of conditions and the following +! disclaimer in the documentation and/or other materials provided +! with the distribution. +! +! * Neither the name of the authors nor the names of its +! contributors may be used to endorse or promote products derived +! from this software without specific prior written permission. +! +! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +! "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +! FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +! COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +! INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +! BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +! LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +! CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +! ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +! POSSIBILITY OF SUCH DAMAGE. +! +submodule (filter) filter_fctry + use elementwise_filter, only : elementwise_filter_t + use PDE_filter, only : PDE_filter_t + use utils, only : concat_string_array, neko_error + implicit none + + ! List of all possible types created by the factory routine + character(len=20) :: FILTER_KNOWN_TYPES(2) = [character(len=20) :: & + "elementwise", & + "PDE"] + +contains + !> Filter factory. Both constructs and initializes the object. + !! @param object The object to be allocated. + !! @param type_name The name of the filter. + !! @param json A dictionary with parameters. + !! @param coef SEM coefficients. + module subroutine filter_factory(object, type_name, json, coef) + class(filter_t), allocatable, intent(inout) :: object + character(len=*), intent(in) :: type_name + type(coef_t), intent(in) :: coef + type(json_file), intent(inout) :: json + character(len=:), allocatable :: type_string + + if (allocated(object)) then + deallocate(object) + else if (trim(type_name) .eq. 'elementwise') then + allocate(elementwise_filter_t::object) + else if (trim(type_name) .eq. 'PDE') then + allocate(pde_filter_t::object) + else + type_string = concat_string_array(FILTER_KNOWN_TYPES, & + NEW_LINE('A') // "- ", .true.) + call neko_error("Unknown filter type: " & + // trim(type_name) // ". Known types are: " & + // type_string) + stop + + end if + call object%init(json, coef) + end subroutine filter_factory + +end submodule filter_fctry From 11f9dcd9b364ad337ed7c2cddc7078482807d1c0 Mon Sep 17 00:00:00 2001 From: Shiyu-Sandy-Du Date: Wed, 5 Feb 2025 14:27:22 +0100 Subject: [PATCH 05/10] support of using json to initialize the transfer function of the elementwise_filter --- src/filter/elementwise_filter.f90 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/filter/elementwise_filter.f90 b/src/filter/elementwise_filter.f90 index dcf3de7d72ae..16e4f0911f32 100644 --- a/src/filter/elementwise_filter.f90 +++ b/src/filter/elementwise_filter.f90 @@ -41,7 +41,7 @@ module elementwise_filter use utils, only : neko_error use neko_config, only : NEKO_BCKND_DEVICE use json_module, only : json_file - use json_utils, only : json_get_or_default + use json_utils, only : json_get_or_default, json_get use speclib, only : zwgll, legendre_poly use matrix, only : matrix_t use mxm_wrapper, only : mxm @@ -94,6 +94,10 @@ subroutine elementwise_filter_init_from_json(this, json, coef) call this%init_from_attributes(coef%dof%xh%lx) + if (json%valid_path('filter.transfer_function')) then + call json_get(json, 'filter.transfer_function', this%trnsfr) + end if + end subroutine elementwise_filter_init_from_json !> Actual Constructor. !! @param nx number of points in an elements in one direction. From 4fa743def450f146ffd42571241f124c0213aed3 Mon Sep 17 00:00:00 2001 From: Shiyu-Sandy-Du Date: Wed, 5 Feb 2025 15:01:15 +0100 Subject: [PATCH 06/10] move the initialization of the elementwise_filter in dynamic smagorinsky to elementwise_filter.f90 --- src/filter/elementwise_filter.f90 | 12 +++++++++++- src/les/dynamic_smagorinsky.f90 | 16 ++++++++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/filter/elementwise_filter.f90 b/src/filter/elementwise_filter.f90 index 16e4f0911f32..35737280bbf0 100644 --- a/src/filter/elementwise_filter.f90 +++ b/src/filter/elementwise_filter.f90 @@ -88,14 +88,24 @@ subroutine elementwise_filter_init_from_json(this, json, coef) class(elementwise_filter_t), intent(inout) :: this type(json_file), intent(inout) :: json type(coef_t), intent(in) :: coef + real(kind=rp), allocatable :: trnsfr(:) ! Filter assumes lx = ly = lz call this%init_base(json, coef) call this%init_from_attributes(coef%dof%xh%lx) + call json_get_or_default(json, "filter.elementwise_filter_type", & + this%elementwise_filter_type, "nonBoyd") + if (json%valid_path('filter.transfer_function')) then - call json_get(json, 'filter.transfer_function', this%trnsfr) + call json_get(json, 'filter.transfer_function', trnsfr) + if (size(trnsfr) .eq. coef%dof%xh%lx) then + this%trnsfr = trnsfr + else + call neko_error("The transfer function of the elementwise & + filter must correspond the order of the polynomial") + end if end if end subroutine elementwise_filter_init_from_json diff --git a/src/les/dynamic_smagorinsky.f90 b/src/les/dynamic_smagorinsky.f90 index 52ea1e1ccf18..eec2cc33b59d 100644 --- a/src/les/dynamic_smagorinsky.f90 +++ b/src/les/dynamic_smagorinsky.f90 @@ -99,8 +99,20 @@ subroutine dynamic_smagorinsky_init(this, dofmap, coef, json) call this%free() call this%init_base(dofmap, coef, nut_name, delta_type) call this%test_filter%init(json, coef) - call json_get_or_default(json, "test_filter_type", filter_type, "nonBoyd") - this%test_filter%elementwise_filter_type = filter_type + if (json%valid_path('filter.transfer_function')) then + call neko_error("Dynamic Smagorinsky model does not support transfer & + &function specified in the json file. & + &Please hard-code it in & + &subroutine set_ds_filt() in & + &src/les/dynamic_smagorisnky.f90") + end if + if (json%valid_path('filter.type')) then + call json_get(json, "filter.type", filter_type) + if (trim(filter_type) .ne. "elementwise") then + call neko_error("Currently only elementwise filter is supported & + for dynamic smagorinsky model.") + end if + end if call set_ds_filt(this%test_filter) call neko_log%section('LES model') From 7d486d7963c18fb83ee37e21e5f64c00b7ca9d79 Mon Sep 17 00:00:00 2001 From: Shiyu-Sandy-Du Date: Wed, 5 Feb 2025 15:18:06 +0100 Subject: [PATCH 07/10] Move build_1d of the elementwise_filter to the constructor, and update the documentation --- doc/pages/user-guide/filter.md | 18 ++++++++++++++---- src/filter/elementwise_filter.f90 | 2 ++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/doc/pages/user-guide/filter.md b/doc/pages/user-guide/filter.md index 325f0cd87bd9..e16a1b873254 100644 --- a/doc/pages/user-guide/filter.md +++ b/doc/pages/user-guide/filter.md @@ -14,15 +14,25 @@ The PDE filter is defined in the derived type `PDE_filter_t`. ... ## Elementwise filter -The elementwise filter is defined in the derived type `elementwise_filter_t`. Basing on the spectral element discretization, it is performed by mapping the field into hierarchical polynomials element by element (currently only Legendre-like polynomials are supported) and then attenuating the kernel for different orders. It could be constructed by calling subroutine `elementwise_filter_t%init(json_t, coef_t)`. +The elementwise filter is defined in the derived type `elementwise_filter_t`. Basing on the spectral element discretization, it is performed by mapping the field into hierarchical polynomials element by element (currently only Legendre-like polynomials are supported) and then attenuating the kernel for different orders. One could directly set it up through the json file if the filter is needed in any section. -After constructing the object, one should also set up `elementwise_filter_t%elementwise_filter_type` and `elementwise_filter_t%trnsfr`. +One could also modify `elementwise_filter_type` and `transfer_function` according to his/her need. -`elementwise_filter_type` is a string to specify the type of usage of the polynomial for the filter. +`elementwise_filter_type` is a optional string to specify the type of usage of the polynomial for the filter. | Name | Polynomials | | ---------------------------- | -------------------------- | | `nonBoyd` | i-th order polynomials L_i(x) | | `Boyd` | L_i(x) for i<2, L_i(x) - L_{i-2}(x) for i>=2| -The kernel is defined through an array `real(kind=rp), allocatable :: trnsfr(:)` whose size is the number of polynomials. The indices of `elementwise_filter_t%trnsfr` corresponds to the polynomial order in ascending order. `elementwise_filter_t%trnsfr` is initialized to be all `1` such that the filter has no effect by default unless further defined. Once `elementwise_filter_t%trnsfr` is defined, one should call the subroutine `elementwise_filter_t%build_1d()` to settle the settings. One could also refer `dynamic_smagorinsky.f90` for an example of using `elementwise_filter_t`. \ No newline at end of file +The kernel is defined through an optional array `transfer_function` whose size is the number of polynomials. The indices of `transfer_function` corresponds to the polynomial order in ascending order. `transfer_function` is initialized to be all `1` such that the filter has no effect by default unless further defined. + +One could set up the elementwise_filter in the following way for polynomial order `7`. +~~~~~~~~~~~~~~~{.json} +"filter": { + "type": "elementwise", + "elementwise_filter_type": "Boyd", + "transfer_function": [1,1,1,0.7,0.3,0,0,0] +} +~~~~~~~~~~~~~~~ +One could also refer to `dynamic_smagorinsky.f90` for an example of using `elementwise_filter_t` in the neko code. \ No newline at end of file diff --git a/src/filter/elementwise_filter.f90 b/src/filter/elementwise_filter.f90 index 35737280bbf0..d6c13ec8db1b 100644 --- a/src/filter/elementwise_filter.f90 +++ b/src/filter/elementwise_filter.f90 @@ -108,6 +108,8 @@ subroutine elementwise_filter_init_from_json(this, json, coef) end if end if + call this%build_1d() + end subroutine elementwise_filter_init_from_json !> Actual Constructor. !! @param nx number of points in an elements in one direction. From abf0a745e7e7b94278972ba83192e03027564f21 Mon Sep 17 00:00:00 2001 From: Shiyu-Sandy-Du Date: Wed, 5 Feb 2025 17:29:32 +0100 Subject: [PATCH 08/10] make filter_factory public --- src/filter/filter.f90 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/filter/filter.f90 b/src/filter/filter.f90 index d13c293ed08b..02d74404b393 100644 --- a/src/filter/filter.f90 +++ b/src/filter/filter.f90 @@ -108,11 +108,10 @@ module subroutine filter_factory(object, type_name, json, coef) character(len=*), intent(in) :: type_name type(coef_t), intent(in) :: coef type(json_file), intent(inout) :: json - character(len=:), allocatable :: type_string end subroutine filter_factory end interface - ! public :: filter_factory + public :: filter_factory contains !> Constructor for the `filter_t` (base) class. From 54938989b284827a331f349a3a6d15b9ed370a4b Mon Sep 17 00:00:00 2001 From: Shiyu Du <115027341+Shiyu-Sandy-Du@users.noreply.github.com> Date: Thu, 6 Feb 2025 14:31:30 +0100 Subject: [PATCH 09/10] Update elementwise_filter.f90 fix a typo --- src/filter/elementwise_filter.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filter/elementwise_filter.f90 b/src/filter/elementwise_filter.f90 index d6c13ec8db1b..d05f1c927030 100644 --- a/src/filter/elementwise_filter.f90 +++ b/src/filter/elementwise_filter.f90 @@ -31,7 +31,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -!> Implements `explicit_filter_t`. +!> Implements `elementwise_filter_t`. module elementwise_filter use num_types, only : rp use filter, only: filter_t From 7437957f17818e110c8ee4086ac6f9f3c0c7f7fd Mon Sep 17 00:00:00 2001 From: Shiyu Du <115027341+Shiyu-Sandy-Du@users.noreply.github.com> Date: Thu, 6 Feb 2025 14:31:55 +0100 Subject: [PATCH 10/10] Update elementwise_filter.f90 fix another typo --- src/filter/elementwise_filter.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filter/elementwise_filter.f90 b/src/filter/elementwise_filter.f90 index d05f1c927030..8244989037d8 100644 --- a/src/filter/elementwise_filter.f90 +++ b/src/filter/elementwise_filter.f90 @@ -53,7 +53,7 @@ module elementwise_filter implicit none private - !> Implements the explicit filter for SEM. + !> Implements the elementwise filter for SEM. type, public, extends(filter_t) :: elementwise_filter_t !> filter type: !> possible options: "Boyd", "nonBoyd"