[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 attributepoints_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 forSolidBody.assemble.vector(block=True)
and the assemble-methods ofSolidBodyNearlyIncompressible
. Ifblock=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 forSolidBodyGravity
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 likeSolidBodyForce
,SolidBodyGravity
andPointLoad
and is applied innewtonrhapson(items, ...)
. - Add a new submodule
view
which contains theView...
classes likeViewSolid
orViewField
, previously located attools._plot
. - Add the
grad
- andhess
-arguments to thereload()
- andcopy()
-methods of aRegion
, i.e.Region.reload(grad=None, hess=None)
. - Add
LinearElasticOrthotropic
. - Add
SolidBodyCauchyStress
in addition toSolidBodyPressure
. - 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 fromfield.values = np.ones(shape) * values
tofield = np.full(shape, fill_value=values, dtype=dtype)
. This enforcesfield = Field(region, values=1)
to return the gradient array with data-typeint
which was of typefloat
before. - Initialize empty matrices of
SolidBodyForce
,SolidBodyGravity
andPointLoad
withdtype=float
. - Don't multiply the assembled vectors of
SolidBodyForce
,SolidBodyGravity
andPointLoad
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
andmechanics.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
anddhdX
. This recovers the integral-form assembly performance from v8.6.0. - Make the private basis classes public (
assembly.expression.Basis
,assembly.expression.BasisField
andassembly.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()
- andhessian()
-methods of the core constitutive material formulations. This removes the ability for temporary material parameters inLinearElastic(E=None, nu=0.3).gradient(x, E=1.0)
, useLinearElastic(E=1.0, nu=0.3).gradient(x)
instead. This affects the material formulationsLinearElastic
,LinearElasticPlaneStrain
,LinearElasticPlaneStress
,LinearElasticLargeStrain
,NeoHooke
andNeoHookeCompressible
.None
is still supported for the material parameters ofNeoHooke
andNeoHookeCompressible
. - Remove
LinearElasticPlaneStrain
from the top-level package namespace because this should only be used withField(region, dim=2)
. The preferred method is to useFieldPlaneStrain(region, dim=2)
and the defaultLinearElastic
.LinearElasticPlaneStrain
remains available inconstitution.LinearElasticPlaneStrain
. - Rename
Mesh.as_pyvista()
toMesh.as_unstructured_grid()
and addMesh.as_pyvista()
as alias.
Deprecated
- Deprecate
SolidBodyGravity
,SolidBodyForce
should be used instead.
What's Changed
- Add
Region.astype(dtype=None)
andField(..., 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
andLaplace
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
andBasisArray
public by @adtzlr in #835 - Add
hess
argument toRegion(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