Closed alexfikl closed 2 months ago
@inducer I think all of my initial questions are solved now, so this is ready for a proper review.
Port at least the internal uses of the various functions to avoid deprecation warnings.
I'm thinking of leaving this for a followup PR, since this is sufficiently big?
Pushed a commit that ports the internal uses of Mesh()
. Mostly a sed
job.
I guess I sort of understand why you might have changed the make_mesh
arguments to groups, *, vertices
, but I don't think it's worth the headache. 99% of meshes have vertices, and the 1% that don't can just pass None
for that first argument.
I guess I sort of understand why you might have changed the
make_mesh
arguments togroups, *, vertices
, but I don't think it's worth the headache. 99% of meshes have vertices, and the 1% that don't can just passNone
for that first argument.
That's fair enough. It definitely makes the porting easier :grin: Thanks for helping with that and fixing all the issues!
Thanks for getting this most of the way!
This starts making
Mesh
into a dataclass. Right now it's mostly just porting away frompytools.Record
, since it's hard to make it a clean dataclass while being backwards compatible.The main additions are:
make_mesh
factory function that does all the work of the Mesh constructor.check_mesh_consistency
function that does all the checking. This seemed useful to make public, since the dataclass version won't do any checking onreplace(mesh, ...)
and it may still be wanted sometimes?get_nodal_adjacency
andget_facial_adjacency_groups
to replace the property versions.~~The nodal / facial adjacency attributes were very annoying. Currently it overwrites
__getattribute__
to make it behave a bit like before. Let me know if you have some better ideas on how to make that work..~This is still a WIP, but I had it lying around for a while, so might as well. Things still to do: