-
Notifications
You must be signed in to change notification settings - Fork 89
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
WIP: Traits for ScalarValues
/ VectorValues
#404
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it looks good, and can be merged...
But we can use the traits in the reinit! methods aswell now:
Ferrite.jl/src/FEValues/cell_values.jl
Line 147 in 6684cb6
isa(cv, CellVectorValues) && (n_func_basefuncs *= dim) |
Just a general question... why not use VectorValues as supertype instead of Face/CellValues. What dictates what trait/property should be used as supertype, and what should be implemented as traits? |
The reason here was to literally replace the old scalar/vector value unions. Sure could be the other way around, but that would be a larger redesign. Would you argue that it really should be the other way around? |
Not worth redesigning I think, I was just wondering if it would be better and if there is some helpful rule to decide what should be used as traits/supertypes |
* traits for ScalarValues & VectorValues * remove outdated / wrong comments * rename to ScalarValue/VectorValued * replace isa(VectorValues) * change version to 0.3.2
A suggestion on using traits instead of Unions for defining
ScalarValues
andVectorValues
.I want to use it for subtyping
Values
without copying a bunch of code from Ferrite. Could also be useful for custom definition of (less common?) problems like the one mentioned in #398.I'm happy to hear some feedback,
if this is appreciated I'll add some docs as well.