comparison TensorMappings.jl @ 159:b790082032da boundary_conditions

Add discussion about what a TensorMapping apply()s to
author Jonatan Werpers <jonatan@werpers.com>
date Fri, 10 May 2019 15:05:26 +0200
parents a3fac8298e3c
children d33b13d2d92b
comparison
equal deleted inserted replaced
158:a3fac8298e3c 159:b790082032da
22 # More prciese domain_size type? 22 # More prciese domain_size type?
23 # domain_size(::TensorMapping{T,R,D}, range_size::NTuple{R,Integer}) where {T,R,D} = 23 # domain_size(::TensorMapping{T,R,D}, range_size::NTuple{R,Integer}) where {T,R,D} =
24 24
25 # Implementing apply_transpose and domain_size is only needed if you want to take transposes of the TensorMapping. 25 # Implementing apply_transpose and domain_size is only needed if you want to take transposes of the TensorMapping.
26 26
27 # What does a TensorMapping apply() to?
28 # =====================================
29 # Is it too strict that TensorMappings apply to AbstractArrays? Maybe we don't need
30 # to know the operands size. That could simplify the handeling of the range_size...
31 # It would just fail if apply does something out of bounds..
32 # No i think knowing the size is a requirement. The TensorMapping must be able to do
33 # different things for different indecies based for example on how close to the boundary we are.
27 34
28 35
29 # Allow using the ' operator: 36 # Allow using the ' operator:
30 struct TensorMappingTranspose{T,R,D} <: TensorMapping{T,D,R} 37 struct TensorMappingTranspose{T,R,D} <: TensorMapping{T,D,R}
31 tm::TensorMapping{T,R,D} 38 tm::TensorMapping{T,R,D}