Mercurial > repos > public > sbplib_julia
changeset 379:de4746d6d126
Add some notes and todos
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 30 Sep 2020 21:30:29 +0200 |
parents | 946516954c85 |
children | 81053b1992b6 |
files | Notes.md TODO.md src/Grids/Grids.jl src/LazyTensors/lazy_tensor_operations.jl test/testSbpOperators.jl |
diffstat | 5 files changed, 19 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/Notes.md Wed Sep 30 21:25:50 2020 +0200 +++ b/Notes.md Wed Sep 30 21:30:29 2020 +0200 @@ -1,13 +1,14 @@ # Notes ## Known size of range and domain? -It might be a good idea let tensormappings know the size of their range and domain as a constant. This probably can't be enforced on the abstract type but maybe we should write our difference operators this way. Having this as default should clean up the thinking around adjoints of boundary operators. It could also simplify getting high performance out of repeated application of regioned TensorMappings. Is there any reason to use a trait to differentiate between fixed size and unknown size? -## Test setup -Once we figure out how to organize the subpackages we should update test folders to Project. As of writing this there seems to be and issue with this approach combined with dev'ed packages so we can't do it yet. It seems that Pkg might fix this in the future. +When do we need to know the size of the range and domain? + * When indexing to provide boundschecking? + * When doing specialised computations for different parts of the range/domain? + * More? -Some steps to imporve the situation right now is to combine everything to one package and use the `@includetests` macro from [TestSetExtensions](https://github.com/ssfrr/TestSetExtensions.jl) together with `Pkg.test(test_args="...")` to selectively run tests. + Maybe if we should have dynamic sizing it could be only for the range. `domain_size` would not be implemented. And the `range_size` would be a function of a vector that the TensorMapping is applied to. ## Reasearch and thinking - [ ] Use a trait to indicate if a TensorMapping uses indices with regions. @@ -18,9 +19,11 @@ - [ ] Figure out repeated application of regioned TensorMappings. Maybe an instance of a tensor mapping needs to know the exact size of the range and domain for this to work? - [ ] Check how the native julia doc generator works - [ ] Check if Vidars design docs fit in there - - [ ] Formalize how range_size() and domain_size() are supposed to work in TensorMappings where dim(domain) != dim(range) (add tests or document) - [ ] Create a macro @lazy which replaces a binary op (+,-) by its lazy equivalent? Would be a neat way to indicate which evaluations are lazy without cluttering/confusing with special characters. - [ ] Specificera operatorer i TOML eller något liknande? H.. H_gamma etc.) - [ ] Dispatch in Lower() instead of the type Lower so `::Lower` instead of `::Type{Lower}` ??? Seems better unless there is some specific reason to use the type instead of the value. + - [ ] How do we handle mixes of periodic and non-periodic grids? Seems it should be supported on the grid level and on the 1d operator level. Between there it should be transparent. + - [ ] Can we have a trait to tell if a TensorMapping is transposable? + - [ ] Is it ok to have "Constructors" for abstract types which create subtypes? For example a Grids() functions that gives different kind of grids based on input?
--- a/TODO.md Wed Sep 30 21:25:50 2020 +0200 +++ b/TODO.md Wed Sep 30 21:30:29 2020 +0200 @@ -9,9 +9,13 @@ - [ ] Add 1D operators (D1, D2, e, d ... ) as TensorOperators - [ ] Create a struct that bundles the necessary Tensor operators for solving the wave equation. - [ ] Add a quick and simple way of running all tests for all subpackages. + - [ ] Replace getindex hack for flatteing tuples with flatten_tuple. + - [ ] Fix indexing signatures. We should make sure we are not too specific. For the "inbetween" layers we don't know what type of index is coming so we should use `I...` instead of `I::Vararg{Int,R}` + - [ ] Use `@inferred` in a lot of tests. -## Other +## Repo - [ ] Add Vidar to the authors list + - [ ] Rename repo to Sbplib.jl # Wrap up tasks - [ ] Kolla att vi har @inbounds och @propagate_inbounds på rätt ställen
--- a/src/Grids/Grids.jl Wed Sep 30 21:25:50 2020 +0200 +++ b/src/Grids/Grids.jl Wed Sep 30 21:30:29 2020 +0200 @@ -14,4 +14,6 @@ include("AbstractGrid.jl") include("EquidistantGrid.jl") +# TODO: Rename AbstractGrid to Grid and move definition here. + end # module
--- a/src/LazyTensors/lazy_tensor_operations.jl Wed Sep 30 21:25:50 2020 +0200 +++ b/src/LazyTensors/lazy_tensor_operations.jl Wed Sep 30 21:30:29 2020 +0200 @@ -14,6 +14,8 @@ # TODO: Do boundschecking on creation! export LazyTensorMappingApplication +# TODO: Go through and remove unneccerary type parameters on functions + Base.:*(tm::TensorMapping{T,R,D}, o::AbstractArray{T,D}) where {T,R,D} = LazyTensorMappingApplication(tm,o) Base.getindex(ta::LazyTensorMappingApplication{T,R,D}, I::Vararg{Index,R}) where {T,R,D} = apply(ta.t, ta.o, I...) Base.getindex(ta::LazyTensorMappingApplication{T,R,D}, I::Vararg{Int,R}) where {T,R,D} = apply(ta.t, ta.o, Index{Unknown}.(I)...)
--- a/test/testSbpOperators.jl Wed Sep 30 21:25:50 2020 +0200 +++ b/test/testSbpOperators.jl Wed Sep 30 21:30:29 2020 +0200 @@ -4,6 +4,8 @@ using Sbplib.RegionIndices using Sbplib.LazyTensors +# TODO: Remove collects for all the tests with TensorApplications + @testset "SbpOperators" begin # @testset "apply_quadrature" begin