-
Notifications
You must be signed in to change notification settings - Fork 4
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
'data_loc' in fields #98
Comments
I like this idea as it allows to double check that |
I just want to elaborate on what I have in mind to make sure we're on the same page. So the main thing is setting a
or with a setter function like
and probably setter function is a better idea and I think this is what you mentioned. But here this approach simply disregards the present The only challenge at this stage is finding the right Another option would be making |
yes, the setter is what I had in mind, and yes, I feel like we shouldn't check |
Related to #91 and the discussions in #95. (particularly #95 (comment))
This issue is not about the mesh object, or the
data_loc
variables it defines, these are solid and finally bringing a functionality we very much need in the codebase. This issue is mainly about thedata_loc
variable infield
, and discussing the best way to manage it.I think managed to come up with a plan where we can have a correct
data_loc
in most fields (all of them in practice), with minimal user intervention.My main concern is about making the user responsible for specifiying the
data_loc
when requesting a field.I think its not the best way to move forward, because we're taking effectively one action, but in two stages, and unnecessarily link them together making a potential mistake more likely.
So essentially, the
tdsops
instancex_stagder_p2v
in the above code snipped already has got enough idea about where the input field data lives and where the output field data lives. I'll go into more detail but my proposal is basically nominating thetds_solve
subroutine to determine thedata_loc
of the outputfield
based on the inputfield
sdata_loc
(if available, but will be available almost in all cases) andtdsops
instance specifications. And once this is sorted we can rest assured that the output field nows about exactly where the data it store lives at.We still need to define the
data_loc
by ourselves for the main field variables (u
,v
, andw
), but the rest will be sorted out by itself because thetdsops
instances can give the correct insight aboutdata_loc
s.The only minor issue for implementing this is that
tdsops
instances are essentially 1D operators, and they can be used in different pairs ofdata_loc
s. For example,x_der1st
can be used to obtain derivatives fromVERT
toVERT
, as well as fromY_EDGE
toY_EDGE
, (also applies toX_FACE
-X_FACE
andZ_EDGE
-Z_EDGE
). And to keep things in good order I think the best is coming up with a terminology intdsops
so that we can deduce the output field'sdata_loc
based on input field'sdata_loc
and this newly introduced variable intdsops
, where it describes the relationship between thedata_loc
s of input/output fields.I think this requires more careful thinking and discussions and of course implementation of this is beyond the scope of #95. I'm looking forward to hear everyones opinion on this and will be happy to give this a try (after #95 is merged) and implement if we're all happy.
The text was updated successfully, but these errors were encountered: