-
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
Simplify deduction of eltype in FunctionValues constructor #857
Comments
The only reason here is literally that I did not want to mix Vec and SMatrix , because of missing support for mixed tensors. :) |
I think for now that is ok, but I talked to @fredrikekre that before releasing 1.0 we should probably add a note in the docs since this will be a breaking change for users of embedded elements when the output changes from SArray to Tensor/MixedTensor. E.g. in interface elements (#767 ), they currently return SArrays when they would in the future return |
I am not sure if there are users for this feature, because it is not really exposed in the docs and I struggle with meshgen. But yes, we should mention the breaking change anyway. |
This patch simplifies the initialization of types for `N`, `dNdx`, and `dNdξ` used in the `FunctionValues` constructor. The change in LOC isn't significant but I think it is easier to follow when there are no auxiliary types and when they are grouped by "case" instead of function name. Fixes #857.
There is also the possibility of |
This patch simplifies the initialization of types for `N`, `dNdx`, and `dNdξ` used in the `FunctionValues` constructor. The change in LOC isn't significant but I think it is easier to follow when there are no auxiliary types and when they are grouped by "case" instead of function name. Fixes #857.
This patch simplifies the initialization of types for `N`, `dNdx`, and `dNdξ` used in the `FunctionValues` constructor. The change in LOC isn't significant but I think it is easier to follow when there are no auxiliary types and when they are grouped by "case" instead of function name. Fixes #857.
What is the application of this? I would find it better to have a flag on FEValues construction, e.g. |
The change from SArray to MixedTensor should be non-breaking, because tensors are just SArrays with defined size + some ops, right? |
Not fully... julia> at = rand(Tensor{2,3});
julia> as = rand(SMatrix{3,3});
julia> as * as
3×3 SMatrix{3, 3, Float64, 9} with indices SOneTo(3)×SOneTo(3):
1.70716 1.13599 1.33628
1.84993 1.49189 1.3397
1.42037 0.676446 1.24042
julia> at * at
ERROR: use `⋅` (`\cdot`) for single contraction and `⊡` (`\boxdot`) for double contraction instead of `*`
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] *(S1::Tensor{2, 3, Float64, 9}, S2::Tensor{2, 3, Float64, 9})
@ Tensors C:\Users\meyer\.julia\packages\Tensors\DZnYM\src\tensor_ops_errors.jl:3
[3] top-level scope
@ REPL[6]:1 |
In #764, a potential simplification of the code linked below was discussed. Would be good to investigate, but this should also become simpler if Ferrite-FEM/Tensors.jl#188 is finalized. CC @termi-official
Ferrite.jl/src/FEValues/FunctionValues.jl
Lines 8 to 30 in 324bd4a
The text was updated successfully, but these errors were encountered: