exasim-project / NeoFOAM

WIP Prototype of a modern CFD core
27 stars 4 forks source link

Return composite sizes from geometricField #169

Open greole opened 2 weeks ago

greole commented 2 weeks ago

Currently, when calling size() for GeometricFields the internalField size is returned. While this is often what user intends it is, however, ambiguous. One better solution would be to return:

a. a tuple<size_t, size_t> with the internalField and boudaryField size b. a struct GeometricFieldSize which holds both values.

in both cases one has to explicitely select which size is desired.

bevanwsjones commented 2 days ago

I had a look into this, as I was hoping to do a bit of warm-up on it :wink:. I am not sure doing this makes sense, because the boundaryFields is not a Field in the same way that the InternalField is a Field. I would suggest we actually change the BoundaryFields name to BoundaryFaceConditions or FaceBoundaryConditions or something similar. It does not really represent a field per se; it's more of a boundary condition container that may contain values of size faces.

greole commented 2 days ago

Yes I strongly agree with renaming boundaryFields,

  1. I think we have too many classes with the name field, which aren't fields. To me a field is a container which supports operations +, *
  2. How about BoundaryValueContainer ? Because as you say it is a container that holds all required values to compute the boundary conditions. That would be also my argument against BoundaryFaceConditions because a. it doensn't know anything about the actual condition and b. maybe we Face could be misleading.