Rethink the API of the domain class
When considering a Domain
, it is not obvious how to get fundamental info such as vertex positions vectors.
We should take a look at the API and try to simplify it.
For instance, currently, to get the position vector one needs to write:
domain = CustomDomain(somePath)
postions = domain.mesh.geometry.x
the returned positions
is an array containing the desired position vectors for all nodes of the mesh.
Ideally, to get such intuitive data, I'd like to write:
positions = domain.vertices
to that end, one can add the following @property
to the class:
@property
def vertices(self)→ numpy.ndarray[float]:
return self.mesh.geometry.x
this is the kind of modifications that could make the API even more user-friendly and intuitive.
Edited by ALI Olivier