xcompact3d / x3d2

https://xcompact3d.github.io/x3d2
BSD 3-Clause "New" or "Revised" License
3 stars 4 forks source link

Add tests for `diffengine` with dirichlet conditions and second order derivatives #4

Closed tlestang closed 11 months ago

tlestang commented 1 year ago

Creation of a diffengine instance and differentiation using its diff type bound procedure is currently only tested with boundary boundary conditions.

A test for differentiation using currently implemented dirichlet boundary schemes (see src/stencil_definitions.f90) would presumably look very similar to the current test, with the exception of the object creation:

  diffeng = diffengine_t("compact6", length=n, order=1, dx=dx, &
                         & left_key="dirichlet", right_key="dirichlet")

Testing second order derivation would also look very similar except for the order dummy argument to the diffengine constructor.

  ! Creates a diffengine for periodic second order differentiation
  ! with 6th order compact scheme.
  diffeng = diffengine_t("compact6", length=n, order=2, dx=dx)