-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Face|Cell)(Scalar|Vector)Values -> (Face|Cell)Values #682
Labels
Comments
I kinda like the idea, as it allows to us address several open issues in a simpler way (e.g. complex-valued problems and general tensor-valued problems, ...) and we can reduce some code duplication. However, I am not super confident regarding the interaction with Tensors.jl here, as well as with constraints between the types which are necessary to avoid performance issues. |
fredrikekre
added a commit
that referenced
this issue
May 16, 2023
…)Values` This patch merges: - `CellScalarValues` and `CellVectorValues` into `CellValues`, - `FaceScalarValues` and `FaceVectorValues` into `FaceValues`, - `PointScalarValues` and `PointVectorValues` into `PointValues`. This is possible now that interpolations are vectorized instead (#694) and, for example, `CellVectorValues(::Interpolation)` can now be spelled as simply `CellValues(::VectorInterpolation)`. The new structs have new parametrization to be more general wrt the storage types to enable embedded elements (#651). They are also parametrized wrt the function interpolation, to enable dispatching on this in e.g. `reinit!`. Instead of simply deprecating the old API (with a warning) this patch implements hard errors for the old constructors with a clear message on how to upgrade. The reason for this is that i) it is possible to tank performance with the new parametrization, ii) for any non-trivial use one would run into errors anyway (e.g. `f(::CellVectorValues)` would give a non-descriptive `MethodError`). Closes #682.
fredrikekre
added a commit
that referenced
this issue
May 16, 2023
…)Values` This patch merges: - `CellScalarValues` and `CellVectorValues` into `CellValues`, - `FaceScalarValues` and `FaceVectorValues` into `FaceValues`, - `PointScalarValues` and `PointVectorValues` into `PointValues`. This is possible now that interpolations are vectorized instead (#694) and, for example, `CellVectorValues(::Interpolation)` can now be spelled as simply `CellValues(::VectorInterpolation)`. The new structs have new parametrization to be more general wrt the storage types to enable embedded elements (#651). They are also parametrized wrt the function interpolation, to enable dispatching on this in e.g. `reinit!`. Instead of simply deprecating the old API (with a warning) this patch implements hard errors for the old constructors with a clear message on how to upgrade. The reason for this is that i) it is possible to tank performance with the new parametrization, ii) for any non-trivial use one would run into errors anyway (e.g. `f(::CellVectorValues)` would give a non-descriptive `MethodError`). Closes #682.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Perhaps we can combine scalar and vector values into a single struct. The
CellScalarValues
andCellVectorValues
structs are almost identical:Ferrite.jl/src/FEValues/cell_values.jl
Lines 37 to 49 in 32d2a58
Ferrite.jl/src/FEValues/cell_values.jl
Lines 89 to 101 in 32d2a58
It should be possible to combine these into something like:
We only use the distinction for e.g.
Ferrite.jl/src/FEValues/common_values.jl
Line 107 in 32d2a58
CellValues{<:AbstractVector}
.Question is if it is worth it.
The text was updated successfully, but these errors were encountered: