Open LenkaNovak opened 8 months ago
Currently, to get the expected surface integrals, the following corrections needs to be applied, depending on whether the original field was center or face:
sum(ones(space_2d_from_3d) ./ Fields.dz_field(space_2d_from_3d) ) # 5.100617440612155e14 (if derived from CenterFiniteDifferenceSpace)
sum(ones(space_2d_from_3d) ./ Fields.dz_field(space_2d_from_3d) .* 2 ) # 5.100617440612155e14 (if derived from FaceFiniteDifferenceSpace)
Whilst we can write convenience functions for this, it seems that there could be a more sophisticated approach that distinguishes between the 2d/3d spaces more clearly.
Is your feature request related to a problem? Please describe. Currently, there are two types of 2d fields
SpectralElementSpace2D
ExtrudedFiniteDifferenceSpace
and then indexed into usingFields.level
when queried, both print the same info, e.g.:
but 2. still contains it's original 3d info and jacobian, etc. This may cause problems when dispatching on space type and/or calculating area integrals using sum.
Describe the solution you'd like It would be good to make 2. a 3d space and allow an additional 2d reduction from that.
Min demo example