Releases: adtzlr/felupe
Releases · adtzlr/felupe
v10.1.0
[10.1.0] - 2026-02-26
Changed
- Make
Mesh.x,Mesh.yandMesh.zwritable. - Use the pseudo-inverse instead of the inverse of the Hessian to calculate
dxinConstitutiveMaterial.optimize(). - Ignore NaN values in the observed data in
ConstitutiveMaterial.optimize().
Fixed
- Fix the dimension of the top-level field returned from
FieldContainer.merge(). Previously, the dimension was taken from the mesh. Now, it is taken from the first field of the first sub-field container.
What's Changed
- Make
Mesh.x,Mesh.yandMesh.zwritable by @adtzlr in #1031 - Fix
ConstitutiveMaterial.optimize()by @adtzlr in #1034 - Fix
FieldContainer.merge()for scalar-valued fields by @adtzlr in #1037
Full Changelog: v10.0.0...v10.1.0
v10.0.0
[10.0.0] - 2026-02-13
Added
- Add
MaterialStrain(..., framework="small-strain")to select a framework. Default is"small-strain"(unchanged) but now"total-lagrange"and"co-rotational"are also supported. Note thatframework="total-lagrange"will change the linear-elastic material model formulation to the Saint-Venant Kirchhoff material model formulation. - Add
MaterialStrain(..., symmetry=True)to enforce the returned stress and elasticity tensors to be (minor) symmetric. Default is True.symmetry=Falsewill improve performance if the providedmaterialreturns symmetric tensors. - Add the Ogden material model formulation also for the JAX-backend
constitution.jax.models.hyperelastic.ogden. - Add
linear_elastic_viscoelastic(), a linear-elastic (deviatoric) viscoelastic material model formulation to be used inMaterialStrain.
Changed
- Don't enforce the returned elasticity tensor in
MaterialStrainto be major-symmetric. - Change the default output of the loadcases
dof.uniaxial(),dof.shear()anddof.biaxial()to return the dict of boundary conditions, but deprecate thisboundaries, loadcase = fem.dof.uniaxial(field, return_loadcase=None)(wasboundaries, loadcase = fem.dof.uniaxial(field)before). The additionalloadcasedict is now optional,boundaries, loadcase = fem.dof.uniaxial(field, return_loadcase=True)is required. - Don't support iteration over a
BoundaryDict. UseBoundaryDict.items()orBoundaryDict.values()instead. - Change the default label value in
Boundary.plot(label="Boundary Condition")(waslabel=Nonebefore). The fall-back toBoundary.nameis removed.
Deprecated
- Deprecate
boundsindof.symmetry(field, bounds=None). Use new equivalentboundariesargument,dof.symmetry(field, boundaries=None). - Deprecate
boundaries, loadcase = fem.dof.uniaxial(field, return_loadcase=None). Usereturn_loadcase=Trueorreturn_loadcase=Falsein new code.return_loadcase=Falsewill be the default value in 11.0.0.
Removed
- Remove deprecated
SolidBodyGravity. - Remove support for Python 3.9.
- Remove unused optional
nameargument inBoundary.
What's Changed
- Add
frameworkargument toMaterialStrainby @adtzlr in #1018 - Enhance
MaterialStrain(..., symmetry=True)by @adtzlr in #1019 - Add
MaterialStrain(framework="co-rotational")by @adtzlr in #1020 - Simplify default return value of loadcases
dof.uniaxial(),dof.shear()anddof.biaxial()by @adtzlr in #1022 - Make
BoundaryDictnon-iterable by @adtzlr in #1023 - Add the Ogden model also for JAX by @adtzlr in #1025
- Remove support for EOL Python 3.9 by @adtzlr in #1026
- Add
linear_elastic_viscoelastic()by @adtzlr in #1027 - Remove name arg in Boundary by @adtzlr in #1029
- deprecate
dof.uniaxial(..., return_loadcase=None)by @adtzlr in #1030
Full Changelog: v9.5.0...v10.0.0
v9.5.0
[9.5.0] - 2025-11-05
Added
- Add a JOSS badge to README.md and change CITATION.cff to JOSS.
- Add the keyword
Job.evaluate(tqdm="tqdm")andnewtonrhapson(tqdm="tqdm")with additional options"auto"and"notebook". Thetqdm-keyword allows to switch the tqdm-backend manually. Note that in a Jupyter console, a progress bar fromtqdm.autodoes not update. - Add the
hessian()method to theArbitraryOrderLagrangeelement and also forBiQuadraticQuadandTriQuadraticHexahedron. - Add
mesh.subdivide()andMesh.subdivide()to refine a mesh with quad, hexahedron, triangle or tetra cells.
Changed
- Change the recommended citation from Zenodo to JOSS in README.md.
Fixed
- Fix the XDMF output error if a global
fieldinJob.evaluate(x0=field)is based onRegionVertex. Fall-back to a basic output with only points and default point-data. - Fix the magnitude in
PointLoad.plot()for 2d-models in 3d-space, e.g. for truss bodies. Use the max. distance per axis instead of the min. distance per axis for the base magnitude of the force arrow(s). - Change the mask-argument of a
Boundaryfrom a boolean array to an array-like argument, which is converted to a boolean array internally. This will handle integer mask-arrays correctly.
What's Changed
- JOSS paper edits by @kyleniemeyer in #1002
- Add
Job.evaluate(tqdm="auto")by @adtzlr in #1005 - Fix the XDMF output error for a global field based on
RegionVertexby @adtzlr in #1007 - Switch to default tqdm-backend by @adtzlr in #1008
- Fix zero magnitude of force arrows in
PointLoad.plot()by @adtzlr in #1010 - Fix
mask-argument ofBoundaryfor integer-based mask arrays by @adtzlr in #1014 - Add hessian-method to bi-/tri- quadratic quad/hexahedron by @adtzlr in #1016
- Add
mesh.subdivide()by @adtzlr in #1017
New Contributors
- @kyleniemeyer made their first contribution in #1002
Full Changelog: v9.4.1...v9.5.0
v9.4.1
v9.4.0
[9.4.0] - 2025-09-25
Added
- Add a method to checkpoint a current state of deformation,
state = SolidBody.checkpoint()and a method to restore checkpoints,SolidBody.restore(state). This is implemented forSolidBody,SolidBodyNearlyIncompressibleandFieldContainer. - Add
math.revolve_points(), to revolve only points instead of a Mesh. Previously,mesh.revolve(points, cells=None, cell_type=None, **kwargs)[0]had to be used. - Add
math.rotate_points(), to rotate only points instead of a Mesh. Previously,mesh.rotate(points, cells=None, cell_type=None, **kwargs)[0]had to be used. - Add
FieldContainer.revolve(),SolidBody.revolve()andSolidBodyNearlyIncompressible.revolve()to convert a axisymmetric field / solid body to a 3d field / solid body. Only implemented for the conversion of axisymmetric quads to hexahedrons. For top-level fields, a vertex-mesh is also supported. - Add
fields, x0 = FieldContainer.merge()to simplify the handling of multiple items (solid bodies). The top-level field containerx0must be used for boundary conditions and inJob.evaluate(x0=x0). - Add a warning if
FieldMixed()is called withaxisymmetric=Trueorplanestrain=True, more than one fieldn>1and a givendim. This dimension is passed to the dual fields only. - Add support for the conversion of
quad9tohexahedron27element types inmesh.revolve()andmesh.expand(). - Add
newtonrhapson.callback(dx, x, iteration, xnorm, fnorm, success)to provide a callback after each completed Newton iteration. This is available asJob.evaluate(callback=newton_callback), whereas a callback after each completed substep has to be provided inJob(callback=substep_callback). - Add a flag to plot MPC and point load either on the deformed (default) or undeformed mesh-points,
MultiPointConstraint.plot(..., deformed=True),MultiPointContact.plot(..., deformed=True),PointLoad.plot(..., deformed=True). - Add
math.svd()for the singular value decomposition of arrays with trailing axes. - Add
newtonrhapson(..., progress_bar=None)which re-uses an existing tqdm progress bar. If provided, this progress bar must be manually closed. If None andverboseis True, a new progress bar is created.
Changed
- Allow field containers to be included in the list of
fieldsinFieldContainer(fields). If a field container is included, its sub-fields are unpacked. - Set custom attributes by keyword-arguments in
FieldContainer(fields, **kwargs). - Show also the progress of Newton's method for
Job.evaluate(verbose=True). - Switch to
tqdm.autofor better progress bars in Jupyter notebooks.
What's Changed
- Remove
SolidBody._area_changeby @adtzlr in #970 - Add
checkpoint()andrestore()methods for solid bodies and field containers by @adtzlr in #972 - Clear force and stiffness results in
SolidBody.restore()by @adtzlr in #973 - Add
math.revolve_points()by @adtzlr in #974 - Make restoring state variables optional by @adtzlr in #975
- Add
math.rotate_points()by @adtzlr in #976 - Add
SolidBody.revolve()to convert axisymmetric models to 3d by @adtzlr in #978 - Add
fields, x0 = FieldContainer.merge()by @adtzlr in #980 - Enhance
FieldContainer.merge()forFieldsMixed()by @adtzlr in #981 - Enhance
FieldContainer.init(): Allow field-containers in addition to fields by @adtzlr in #982 - Add
FieldContainer.revolve()by @adtzlr in #984 - Enhance
mesh.revolve()andmesh.expand(): Add support forquad9tohexahedron27by @adtzlr in #985 - Replace logo and simplify readme by @adtzlr in #987
- Add
newtonrhapson(..., callback=None)by @adtzlr in #989 - Tests: Enforce
matplotlib.use("Agg")to avoid tcl-related errors by @adtzlr in #992 - Enhance
MultiPointConstraint.plot(..., deformed=True)by @adtzlr in #993 - Add
math.svd()by @adtzlr in #994 - Show a progress for Newton's method by @adtzlr in #996
- Enhance the progress monitoring of Newton's method by @adtzlr in #998
- Switch to
tqdm.autofor better progress bars in Jupyter by @adtzlr in #999
Full Changelog: v9.3.0...v9.4.0
v9.3.0
[9.3.0] - 2025-06-29
Added
- Add
Mesh.add_points(points)to update the mesh with additional points. - Add
Mesh.clear_points_without_cells()to clear the list of points without cells (useful for center-points of multi-point constraints). - Release FElupe on conda-forge, starting with v9.2.0.
- Add
ConstitutiveMaterial.is_stable()which returns a boolean mask of stability for isotropic material model formulations. Note that this will require an additional volumetric part of the strain energy density function for hyperelastic material model formulations without a volumetric part. - Add the linear-elastic material formulation
constitution.LinearElastic1D()and a truss-bodymechanics.TrussBody(). - Add
RegionTrusswith a truss element. This is a line element with aGaussLobatto(order=0)quadrature, i.e. with two quadrature points located at the boundaries.
Changed
- Change the required setuptools-version in the build-system table of
pyproject.tomlto match PEP639 (setuptools>=77.0.3). - Change the labels to well-known labels for the URLs in
pyproject.toml. - Change the first return value of
ViewMaterial.uniaxial(),ViewMaterial.planar(),ViewMaterial.biaxial(),ViewMaterialIncompressible.uniaxial(),ViewMaterialIncompressible.planar(),ViewMaterialIncompressible.biaxial()from the stretch to a list of all three principal stretches.
Fixed
- Fix the declaration of the (spdx identifier) license and license-file in
pyproject.toml. - Fix missing import of
TriQuadraticHexahedronin the top-level namespace. - Fix the path to
docs/_static/logo_without_text.svgindocs/conf.py. - Fix a typo in the docstring of
MeshContainer.from_unstructured_grid(). - Fix
CompositeMaterialfor input lists of length 1.
What's Changed
- Add
Mesh.add_points(points)andMesh.clear_points_without_cells()by @adtzlr in #947 - Update license in pyproject.toml by @adtzlr in #954
- Make license-files more explicit in
pyproject.tomlby @adtzlr in #955 pyproject.tomlensure PEP639 support by @adtzlr in #956- Fix missing import of
TriQuadraticHexahedronby @adtzlr in #958 - Fix the path to the logo in
docs/conf.pyby @adtzlr in #959 - Fix a typo in the docstring of
MeshContainer.from_unstructured_grid()by @adtzlr in #960 - Enhance some docstrings (only minor changes) by @adtzlr in #961
- Docs: Use matplotlib-directive for plots by @adtzlr in #962
- Fix typo from seperated to separated by @tkoyama010 in #963
- Add
ConstitutiveMaterial.is_stable()and fixCompositeMaterialby @adtzlr in #965 - Add
mechanics.Trussandconstitution.LinearElastic1Dby @adtzlr in #966 - Add
RegionTrussby @adtzlr in #967
Full Changelog: v9.2.0...v9.3.0
v9.2.0
Added
- Add
SolidBody.assemble.mass(density=1.0)andSolidBodyNearlyIncompressible.assemble.mass(density=1.0)to assemble the mass matrix. - Add
SolidBody.evaluate.stress(field)to evaluate the (first Piola-Kirchhoff) stress tensor (engineering stress in linear elasticity). - Add a free-vibration modal analysis Step/Job
FreeVibration(items, boundaries)with methods to evaluateFreeVibration.evaluate()and to extractfield, frequency = FreeVibration.extract(n)its n-th result. - Add
Boundary.plot()to plot the points and prescribed directions of a boundary. - Add
BoundaryDictas a subclassed dict with methods toplot(),screenshot()andimshow(). - Add a new argument to apply a callable on the assembled vector/matrix of a solid body,
SolidBody(..., apply=None). This may be used to sum the list of sub-blocks instead of stacking them together,SolidBody(..., block=False, apply=None). This is useful for mixed formulations where both the deformation gradient and the displacement values are required. - Add support for non-symmetric bilinear mixed forms in
IntegralForm. - Add
element.Elementto the top-level package namespace. - Raise a TypeError if a mesh container is used as the
mesh-argument in a region. The error message explains that the container is not supported. A mesh must be used instead. - Add the
Vertexelement formulation. - Add a vertex-region
RegionVertex. - Add
MeshContainer.as_vertex_mesh()to create a merged vertex mesh from the meshes of the mesh container. - Add
Field.from_mesh_container(container)to create a top-level field on a vertex mesh. - Add
GaussLobattoquadrature. The order-argument is equal to the 1d-sample points minus two. This ensures identical minimum order-arguments for Gauss-Legendre and Gauss-Lobatto schemes.
Changed
- The first Piola-Kirchhoff stress tensor is evaluated if
ViewSolid(stress_type=None). - Autodetect the stress-type in
SolidBody.plot(name)fromname. - Enhance the
hello_world(axisymmetric=False, planestrain=False, curve=False, xdmf=False, container=False)function with new arguments to customize the generated template script. - Enhance
Boundarywith added support for multiaxial prescribed values. - Enhance
math.linsteps(..., values=0)with default values except for the columnaxisifaxisis not None. - Link all field-values to the values of the first field if no other field is given in
FieldContainer.link(). - Change the default arguments from
block=Truetoblock=NoneinSolidBody.assemble.vector(block=None)andSolidBody.assemble.matrix(block=None)and defineblockon creation,SolidBody(..., block=True)instead. - Integrate and assemble
None-items in thefun-argument ofIntegralForm. On integration,Noneis returned.Nonewill be assembled to an emtpy sparse matrix. - Enhance
mesh.interpolate_line(mesh, xi, axis=None, ...)which by default uses a curve-progress variable whenaxis=None. The curve progress evaluation pointsximust be within0 <= xi <= 1.
Fixed
- Fix
Boundary(..., mode="and")by ignoring any undefined axis. - Fix
tools.hello_world(planestrain=True)with the correct regionRegionQuadfor the plane-strain template. - Fix the cells-array in
RegionQuadraticQuadBoundaryfor midpoints of edges. - Fix
FieldContainer.plot()for regions without the shape-function gradients available.
Removed
- Remove the unused
shape-argument inelement.Element(shape). Adopt the arbitrary-lagrange element to use its owndim-argument. This simplifies the creation of custom finite element formulations.
What's Changed
- Add
SolidBody.evaluate.mass(density=1.0)by @adtzlr in #906 - Add
SolidBody.evaluate.stress()and autodetect the stress-type inSolidBody.plot(name)fromnameby @adtzlr in #908 - Add
FreeVibration(items, boundaries)by @adtzlr in #909 - Enhance
Boundary: Add support for multiaxial prescribedvalue-argument by @adtzlr in #912 - Add
Boundary.plot()and fixBoundary(..., mode="and")by @adtzlr in #913 - Add
BoundaryDictby @adtzlr in #915 - Add
PointLoad.plot()by @adtzlr in #916 - Enhance
math.linsteps(..., values=0.0)by @adtzlr in #917 - Enhance
FieldContainer.link()by @adtzlr in #918 - Add
SolidBody(..., block=True, apply=None)by @adtzlr in #920 - Enhance
IntegralForm: Non-symmetric mixed forms andNoneby @adtzlr in #922 - Simplify init of base-class
element.Elementby @adtzlr in #924 - Fix
hello_word(planestrain=True)by @adtzlr in #928 - Fix
RegionQuadraticQuadBoundaryby @adtzlr in #933 - Don't create a figure if error in
umat.plot()by @adtzlr in #934 - Raise a TypeError if a container is used in a region by @adtzlr in #939
- Add
MeshContainer.as_vertex_mesh()andField.from_mesh_container()by @adtzlr in #940 - Fix
FieldContainer.plot()forRegionVertex(no gradient available) by @adtzlr in #942 - Add
GaussLobattoquadrature scheme by @adtzlr in #943 - Enhance
mesh.interpolate_line(axis=None)by @adtzlr in #945 - Set version tag to 9.2.0 by @adtzlr in #946
Full Changelog: v9.1.0...v9.2.0
v9.1.0
[9.1.0] - 2024-11-23
Tip
This release adds JAX as alternative backend to the default tensortrax-backend for automatic differentiation. Hyperelastic and Material classes are available at felupe.constutition.jax, but only some models are included for JAX. JAX is great for computationally expensive models. However, it runs on single-precision by default. Hence, either the tolerance of the Newton-Rhapson method must be relaxed or JAX must be enforced to use 64bit floats.
Added
- Add the hessian of the element shape functions for a quadratic quad element
QuadraticQuad.hessian(). - Add the
order-argument toFieldContainer.extract(order="C")as well as forField,FieldAxisymmetric,FieldPlaneStrainto return C-contiguous arrays by default. - Add an optional multiplier to
Laplace(multiplier=1.0). - Add optional keyword-arguments to
math.transpose(**kwargs)to support optionaloutandorder-keywords. - Add the attribute
RegionBoundary.tangents, which contains a list of tangent unit vectors. Forquadcell-types the length of this list is one and forhexahedroncell-types it is of length two. - Add
math.inplane(A, vectors)to return the in-plane components of a symmetric tensorA, where the plane is defined by its standard unit vectors. - Add
constitution.jax.Hyperelasticas a feature-equivalent alternative toHyperelasticwithjaxas backend. - Add
constitution.jax.Material(..., jacobian=None)with JAX as backend. A custom jacobian-callable may be passed to switch between forward- and backward-mode automatic differentiation. - Add material models for JAX-based materials. Hyperelastic models available at
constitution.jax.models.hyperelastic:extended_tube(),miehe_goektepe_lulei(),mooney_rivlin(),neo_hooke(),yeoh(),third_order_deformation(),van_der_waals(). Lagrange (stress-based) models available atconstitution.jax.models.lagrange:morph(),morph_representative_directions(). - Add
constitution.jax.total_lagrange(),constitution.jax.updated_lagrange()andconstitution.jax.isochoric_volumetric_split()function decorators for the JAX hyperelastic material class. - Add an optional keyword-argument
Region.astype(copy=True)to modify the data types of the arrays of the region in-place ifcopy=False. - Add
FieldContainer.evaluate.right_cauchy_green_deformation()andmath.right_cauchy_green_deformation(field)to evaluate the right Cauchy-Green deformation tensor. - Add
math.strain(field, C=None, ..., **kwargs)to use a given right Cauchy-Green deformation tensor for the evaluation of the strain tensor. - Add the hyperelastic foam models
storakers()andblatz_ko()for both AD-backends. - Add the
saint_venant_kirchhoff_orthotropic()hyperelastic model (tensortrax).
Changed
- Change default
np.einsum(..., order="K")tonp.einsum(..., order="C")in the methods ofField,FieldAxisymmetric,FieldPlaneStrainandFieldContainer. - Change supported Python versions to 3.9 - 3.12.
- Change the
dtype-argument inRegion.astype(dtype)from an optional to a required argument. - Make
tensortraxan optional dependency (again). Now FElupe does only depend on NumPy and SciPy, all other extras are optional.
Fixed
- Fix the number of points for non-disconnected dual meshes. This reduces the assembled (sparse) vector- and matrix-shapes, which are defined on mixed-fields.
- Fix wrong results of
ConstitutiveMaterial.plot()if any stretch is non-physical, i.e. lower or equal zero. This raises an error now.
Removed
- Remove the unused, deprecated aliases
UserMaterial,UserMaterialStrainandUserMaterialHyperelastic.
What's Changed
- Add
QuadraticQuad.hessian()by @adtzlr in #851 - Update issue templates by @adtzlr in #855
- Fix pyOpenSci basic checks by @adtzlr in #854
- Extract C-contiguous arrays by default from fields by @adtzlr in #856
- Add an optional multiplier in
Laplace(multiplier=1.0)by @adtzlr in #864 - Add optional kwargs in
math.transpose(**kwargs)by @adtzlr in #865 - Fix the number of points for non-disconnected dual-meshes by @adtzlr in #867
- Fix wrong result of
ConstitutiveMaterial.plot()if any stretch <= 0 by @adtzlr in #872 - Add
RegionBoundary.tangentsandmath.inplane()by @adtzlr in #873 - Add
constitution.jax.Hyperelasticby @adtzlr in #876 - Group the
constitutionmodule by autodiff-backends by @adtzlr in #878 - Add
felupe.constitution.autodiff.jax.Materialby @adtzlr in #879 - Add
morph()for JAX-basedMaterialby @adtzlr in #880 - Simplify the constitution module by @adtzlr in #881
- Add Total-Lagrange and Updated-Lagrange decorators for JAX by @adtzlr in #883
- Add more JAX-based models by @adtzlr in #884
- Add
isochoric_volumetric_split()for JAX-hyperelastic material by @adtzlr in #885 - Move
constitution.jax.isochoric_volumetric_split()by @adtzlr in #887 - Add optional in-place cast
Region.astype(dtype, copy=True)by @adtzlr in #888 - Make the examples run faster on CI/CD by @adtzlr in #890
- Add
miehe_goektepe_luleimodel for JAX by @adtzlr in #892 - Make
tensortraxoptional by @adtzlr in #894 - Test the import in an environment with no autodiff-backend present by @adtzlr in #895
- Enable
jax.Hyperelastic(..., parallel=True)withjax.pmapon quadrature-points axis by @adtzlr in #896 - Update GitHub-Actions by @adtzlr in #897
- Add math-function for the right Cauchy-Green deformation tensor by @adtzlr in #898
- Add the Storåkers hyperelastic foam model by @adtzlr in #900
- Add the Blatz-Ko hyperelastic foam model by @adtzlr in #901
- Add the Van-der-Waals model for JAX by @adtzlr in #902
- Add more hyperelastic models by @adtzlr in #903
- Add
constitution.lame_converter_orthotropic()by @adtzlr in #904 - Add an optional strain exponent for the SVK-material by @adtzlr in #905
Full Changelog: v9.0.0...v9.1.0
v9.0.0
[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_derivativeholds 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
SolidBodyForceas a replacement forSolidBodyGravitywith more general keyword arguments ("values"instead of"gravity","scale"instead of"density"). - Add
Laplaceto 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,SolidBodyGravityandPointLoadand is applied innewtonrhapson(items, ...). - Add a new submodule
viewwhich contains theView...classes likeViewSolidorViewField, 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
SolidBodyCauchyStressin 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) * valuestofield = np.full(shape, fill_value=values, dtype=dtype). This enforcesfield = Field(region, values=1)to return the gradient array with data-typeintwhich was of typefloatbefore. - Initialize empty matrices of
SolidBodyForce,SolidBodyGravityandPointLoadwithdtype=float. - Don't multiply the assembled vectors of
SolidBodyForce,SolidBodyGravityandPointLoadby-1.0. Instead,mechanics.Assemble(multiplier=-1.0)is used in the solid bodies. - Change the visibility of the internal helpers
mechanics.Assemble,mechanics.Evaluateandmechanics.Resultsfrom private to public. - Import the
assemblymodule 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
handdhdX. This recovers the integral-form assembly performance from v8.6.0. - Make the private basis classes public (
assembly.expression.Basis,assembly.expression.BasisFieldandassembly.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,NeoHookeandNeoHookeCompressible.Noneis still supported for the material parameters ofNeoHookeandNeoHookeCompressible. - Remove
LinearElasticPlaneStrainfrom 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.LinearElasticPlaneStrainremains available inconstitution.LinearElasticPlaneStrain. - Rename
Mesh.as_pyvista()toMesh.as_unstructured_grid()and addMesh.as_pyvista()as alias.
Deprecated
- Deprecate
SolidBodyGravity,SolidBodyForceshould 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
SolidBodyForceandLaplaceby @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
quadraturesubmodule by @adtzlr in #824 - Enhance the imports of the
mechanicssubmodule 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,BasisFieldandBasisArraypublic by @adtzlr in #835 - Add
hessargument toRegion(hess=False)by @adtzlr in #836 - Add
LinearElasticOrthotropicby @adtzlr in #840 - Add
SolidBodyCauchyStressby @adtzlr in #842 - Remove temporary kwargs in core constitutive materials by @adtzlr in #843
- Don't import
LinearElasticPlaneStrainin 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
v8.8.0
[8.8.0] - 2024-06-16
Added
- Add
Region(uniform=False), a flag to invoke a reduced evaluation of the element shape functions and their gradients. If True, only the first cell is evaluated. This drastically speeds up linear-elasticity on uniform grid meshes (e.g. voxel-like quads and hexahedrons). - Add an update-method in
FormItem(..., ramp_item=0).update(value). This enables aFormItemto be used as a ramped-item in aStep.
What's Changed
- Add
Region(uniform=False): A performance feature for uniform grid meshes by @adtzlr in #792 - Add
FormItem().update(values)by @adtzlr in #796
Full Changelog: v8.7.0...v8.8.0