-
Notifications
You must be signed in to change notification settings - Fork 30
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
Slight update to field_dirichlet bcs #1261
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.
Looks good, the only minor thing is the user_bc_
name in fluid_scheme
, not it kind of reads like field_dirichlet is the only user provided bc. I could be wrong, haven't followed the latest bc work too closely.
There is also the pointwise user inflow bc, which hides in |
Added field |
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 much cleaner now, thanks!! As I said at some point we should only pass down the fields that are initialized to the user_dirichlet_update, but for now I guess this is fine?
My main goal here is to reduce the number of additional components in the scheme types necessary to add the user field_dirichlet bcs. Currently we need the bc itself, a field list for the dummy fields in the bc, a bc_list to store the field_dirichlet bcs themselves, and an update procedure pointer to the user routine.
To trim this down, I put most of these things inside the field_dirichlet types themselves. The only extra thing still in the scalar_scheme is the bc_list. I did not quite dare to add a bc_list to a type to store.. a pointer to itself. However, for the field_dirichlet_vector I could store the bc_list, it just contains the 3 field_dirichlet_bcs that are stored as components inside field_dirichlet_vector.
For the fluid, I use the lists in velocity field_dirichlet to also store the field and bc for the pressure. I also use it to store the
update
pointer.Also adds some extra routines to the field_list wrapper.
As a note, the way things are handled for the field_dirichlet_vector is a bit scary, because we always add the dummy fields for u,v,w,p, even when they are not initialized due to the fact that the bc for them is not asked for in the case file. So, if you point to those uninitialized fields in the user routine, things will crash. I have not addressed this here.