Skip to content

v9.0.0

Latest
Compare
Choose a tag to compare
@adtzlr adtzlr released this 06 Sep 13:58
· 45 commits to main since this release

[9.0.0] - 2024-09-06

Added

  • Add Region.astype(dtype=None) to copy and cast the region arrays to a specified type.
  • Add Field(..., dtype=None) to cast the array with field values to a specified type.
  • Add Field.extract(dtype=None) to cast the extracted field gradient/interpolated values to a specified type.
  • Add hello_world() to print the lines of a minimal-working-example to the console.
  • Add mesh.interpolate_line(mesh, xi, axis) to interpolate a line mesh. The attribute points_derivative holds the derivatives of the independent variable w.r.t. the dependent variable(s). The column of the independent variable is filled with zeros.
  • Add optional keyword-argument SolidBody.assemble.matrix(block=True), also for SolidBody.assemble.vector(block=True) and the assemble-methods of SolidBodyNearlyIncompressible. If block=False, these methods will assemble a list of the upper-triangle sub block-vectors/-matrices instead of the combined block-vector/-matrix.
  • Add SolidBodyForce as a replacement for SolidBodyGravity with more general keyword arguments ("values" instead of "gravity", "scale" instead of "density").
  • Add Laplace to be used as user-material in a solid body. Works with scalar- and vector-valued fields.
  • Add an optional mechanics.Assemble(..., multiplier=None) argument which is used in external items like SolidBodyForce, SolidBodyGravity and PointLoad and is applied in newtonrhapson(items, ...).
  • Add a new submodule view which contains the View... classes like ViewSolid or ViewField, previously located at tools._plot.
  • Add the grad- and hess-arguments to the reload()- and copy()-methods of a Region, i.e. Region.reload(grad=None, hess=None).
  • Add LinearElasticOrthotropic.
  • Add SolidBodyCauchyStress in addition to SolidBodyPressure.
  • Add mesh.cell_types() which returns an object-array with cell-type mappings for FElupe and PyVista.
  • Add MeshContainer.from_unstructured_grid(grid, dim=None, **kwargs) to create a mesh-container from an unstructured grid (PyVista).

Changed

  • Change the internal initialization of field = Field(region, values=1, dtype=None) values from field.values = np.ones(shape) * values to field = np.full(shape, fill_value=values, dtype=dtype). This enforces field = Field(region, values=1) to return the gradient array with data-type int which was of type float before.
  • Initialize empty matrices of SolidBodyForce, SolidBodyGravity and PointLoad with dtype=float.
  • Don't multiply the assembled vectors of SolidBodyForce, SolidBodyGravity and PointLoad by -1.0. Instead, mechanics.Assemble(multiplier=-1.0) is used in the solid bodies.
  • Change the visibility of the internal helpers mechanics.Assemble, mechanics.Evaluate and mechanics.Results from private to public.
  • Import the assembly module to the global namespace.
  • Isolate the submodules, i.e. a submodule only uses the public API of another submodule. If necessary, this will help to change one or more modules to a future extension package.
  • Enforce contiguous arrays for the region shape-function and -gradient arrays h and dhdX. This recovers the integral-form assembly performance from v8.6.0.
  • Make the private basis classes public (assembly.expression.Basis, assembly.expression.BasisField and assembly.expression.BasisArray) as especially their docstrings are useful to understand how a Basis is created on a field.
  • Remove material parameter keyword-arguments in the function()-, gradient()- and hessian()-methods of the core constitutive material formulations. This removes the ability for temporary material parameters in LinearElastic(E=None, nu=0.3).gradient(x, E=1.0), use LinearElastic(E=1.0, nu=0.3).gradient(x) instead. This affects the material formulations LinearElastic, LinearElasticPlaneStrain, LinearElasticPlaneStress, LinearElasticLargeStrain, NeoHooke and NeoHookeCompressible. None is still supported for the material parameters of NeoHooke and NeoHookeCompressible.
  • Remove LinearElasticPlaneStrain from the top-level package namespace because this should only be used with Field(region, dim=2). The preferred method is to use FieldPlaneStrain(region, dim=2) and the default LinearElastic. LinearElasticPlaneStrain remains available in constitution.LinearElasticPlaneStrain.
  • Rename Mesh.as_pyvista() to Mesh.as_unstructured_grid() and add Mesh.as_pyvista() as alias.

Deprecated

  • Deprecate SolidBodyGravity, SolidBodyForce should be used instead.

What's Changed

  • Add Region.astype(dtype=None) and Field(..., dtype=None) by @adtzlr in #797
  • Add hello_world() by @adtzlr in #799
  • Add mesh.interpolate_line(mesh, xi, axis) by @adtzlr in #811
  • Change the derivative storage in mesh.interpolate_line() by @adtzlr in #812
  • Add optional SolidBody.assemble.matrix(block=False) by @adtzlr in #813
  • Add SolidBodyForce and Laplace by @adtzlr in #814
  • Add optional Assemble(multiplier=None) by @adtzlr in #817
  • Change the visibility of the helpers in the mechanics-module from private to public by @adtzlr in #818
  • Fix Ex.09: Take care of changed sign of external form items by @adtzlr in #820
  • Add submodule view by @adtzlr in #823
  • Enhance the imports of the quadrature submodule by @adtzlr in #824
  • Enhance the imports of the mechanics submodule by @adtzlr in #825
  • Enhance (isolate) the cross-imports between submodules by @adtzlr in #826
  • Fix the assembly performance by @adtzlr in #828
  • Test if region attribute arrays are C-contiguous by @adtzlr in #829
  • Add an example for the third medium contact method by @adtzlr in #834
  • Make the classes Basis, BasisField and BasisArray public by @adtzlr in #835
  • Add hess argument to Region(hess=False) by @adtzlr in #836
  • Add LinearElasticOrthotropic by @adtzlr in #840
  • Add SolidBodyCauchyStress by @adtzlr in #842
  • Remove temporary kwargs in core constitutive materials by @adtzlr in #843
  • Don't import LinearElasticPlaneStrain in top-level package namespace by @adtzlr in #844
  • Add felupe.mesh.cell_types() by @adtzlr in #846
  • Add MeshContainer.from_unstructured_grid() by @adtzlr in #847
  • Update README.md by @adtzlr in #850

Full Changelog: v8.8.0...v9.0.0