Closed srosenbu closed 5 months ago
With regard to the python code, the only class to rewrite would be MechanicsProblem
(unless I am overlooking something).
For the general design, I think that we could keep the existing structure, that is we have global arrays holding the strain, stress and stiffness (algorithmic) tangent values (for all integration points) which are then passed by reference (no copy) and used by IpLoop
which manages which integration point should use what kind of constitutive law to compute stresses (and tangents) from strain.
Fenicsx is now stable enough and well documented enough to be used. The Python code is written for legacy fenics and should be replaced. Also Fenicsx allows for the direct manipulation of entries in the Function array, whereas in legacy fenics we can only work on copies. In legacy Fenics
v.vector().get_local()
returns a copy of the vector. In Fenicsxv.vector.array
returns a numpy vector that points to the data directly -> No copyExploiting this, could reduce the memory use of the library by up to 2/3