Skip to content

Commit

Permalink
Add SummationByPartsOperators.jl package extension (#152)
Browse files Browse the repository at this point in the history
* adding initial extension for SummationByPartsOperators

* adding missing package imports

* add SBP extension tests

* rename multidimensional SBP tests

update name of multidim SBP tests

d

* update docs

* bump Julia compat to 1.9

* revert back to Julia compat 1.7, add Requires

* add forgotten part

* add [extras] to Project.toml

* try to fix tests to work with Requires for pre 1.9 julia

* fix Requires by moving ext into `init` function

* add dropped import

* formatting

* add mroe tests
  • Loading branch information
jlchan authored Oct 7, 2023
1 parent 77224d9 commit f73e661
Show file tree
Hide file tree
Showing 8 changed files with 576 additions and 13 deletions.
10 changes: 10 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Triangulate = "f7e6ffb2-c36d-4f8f-a77e-16e897189344"
WriteVTK = "64499a7a-5c06-52f2-abe2-ccb03c286192"

[weakdeps]
SummationByPartsOperators = "9f78cca6-572e-554e-b819-917d2f1cf240"

[extensions]
StartUpDGSummationByPartsOperatorsExt = "SummationByPartsOperators"

[compat]
ConstructionBase = "1"
FillArrays = "0.13, 1"
Expand All @@ -37,6 +43,10 @@ Requires = "1"
Setfield = "1"
SimpleUnPack = "1"
StaticArrays = "1"
SummationByPartsOperators = "0.5"
Triangulate = "2"
WriteVTK = "1"
julia = "1.7"

[extras]
SummationByPartsOperators = "9f78cca6-572e-554e-b819-917d2f1cf240"
17 changes: 15 additions & 2 deletions docs/src/RefElemData.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,22 @@ By default, `RefElemData` is constructed for a nodal basis (in order to facilita

## `RefElemData` based on SBP finite differences

It is also possible to construct a [`RefElemData`](@ref) based on [multi-dimensional SBP finite difference operators](https://doi.org/10.1137/15M1038360). These utilize nodes constructed by [Tianheng Chen and Chi-Wang Shu](https://doi.org/10.1016/j.jcp.2017.05.025), [Ethan Kubatko](https://sites.google.com/site/chilatosu/ethan-bio), and [Jason Hicken](https://doi.org/10.1007/s10915-020-01154-8).
It is also possible to construct a [`RefElemData`](@ref) based on both traditional finite difference SBP operators and [multi-dimensional SBP finite difference operators](https://doi.org/10.1137/15M1038360). The traditional finite difference SBP operators are built using [SummationByPartsOperators.jl](https://github.com/ranocha/SummationByPartsOperators.jl). The multi-dimensional SBP operators utilize nodes constructed by [Tianheng Chen and Chi-Wang Shu](https://doi.org/10.1016/j.jcp.2017.05.025), [Ethan Kubatko](https://sites.google.com/site/chilatosu/ethan-bio), and [Jason Hicken](https://doi.org/10.1007/s10915-020-01154-8).

Some examples:
Some examples of traditional finite difference SBP operators on tensor product domains:
```julia
using StartUpDG
using SummationByPartsOperators # this package must be loaded to enable extension

D = derivative_operator(MattssonNordström2004(),
derivative_order=1, accuracy_order=N+1,
xmin=-1.0, xmax=1.0, N=20)

rd = RefElemData(Line(), D)
rd = RefElemData(Quad(), D)
rd = RefElemData(Hex(), D)
```
Some examples of multi-dimensional SBP operators:
```julia
N = 3
rd = RefElemData(Quad(), SBP(), N) # defaults to SBP{TensorProductLobatto}
Expand Down
Loading

0 comments on commit f73e661

Please sign in to comment.