Closed timofeymukha closed 1 month ago
Looks good, the only minor thing is the
user_bc_
name influid_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 bc_inflow
. My idea was that it will be removed anyway, but it seems we want to keep those, so you have a point. I can change to user_field_bc...
to distinguish them for now, perhaps.
Looks good, the only minor thing is the
user_bc_
name influid_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.
Added field
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.