Releases: adtzlr/felupe
Releases · adtzlr/felupe
v7.14.0
[7.14.0] - 2024-02-11
Added
- Add optional output location for
FieldContainer.extract(out=None)
. - Add
Mesh.update(callback=None)
. This is especially useful if the points array of a mesh is changed and an already existing instance of a region has to be reloaded:Mesh.update(points=new_points, callback=region.reload)
. - Add
ax = FieldContainer.imshow()
which acts as a wrapper on top of theimg = FieldContainer.screenshot(filename=None)
method. The image data is passed to a matplotlib figure and theax
object is returned. - Add
ax = Mesh.imshow()
which acts as a wrapper on top of theimg = Mesh.screenshot(filename=None)
method. The image data is passed to a matplotlib figure and theax
object is returned. - Add view-methods for
SolidBody
andSolidBodyNearlyIncompressible
(same as already implemented for mesh and fields). - Add lists with norms of values and norms of the objective function in
tools.NewtonResult(xnorms=None, fnorms=None)
. - Add lists of norms of the objective function as attribute to
Job.fnorms
. - Add new method to
Mesh
for getting point ids next to a given point coordinateMesh.get_point_ids(value)
. - Add new method to
Mesh
for getting cells attached to a given point coordinateMesh.get_cell_ids(point_ids)
. - Add new method to
Mesh
for getting neighbour cellsMesh.get_cell_ids_neighbours(cell_ids)
. - Add new method to
Mesh
for getting shared points between neighbour cellsMesh.get_point_ids_shared(cell_ids_neighbours)
. - Add new method to
Mesh
for getting points on regular grids which are located at cornersMesh.get_point_ids_corners()
. - Add new method to
Mesh
for modifying the cell connectivity at cornersMesh.modify_corners(point_ids=None)
, supported for regular quad and hexahedron meshes.
Changed
- Pass optional keyword-arguments in
math.dot(**kwargs)
to the underlying einsum-calls. - Enhance the performance of
math.cdya()
by reducing the number of (intermediate) arrays to be created from 4 to 2. - Use fixed output locations for the extracted field-gradients and the integrated stiffness matrices in
SolidBody
andSolidBodyNearlyIncompressible
. This enhances the performance. - Change default filename in
Mesh.screenshot()
fromfilename="field.png"
tofilename="mesh.png"
. - Change the return value on job-evaluation from
None = Job.evaluate()
tojob = Job.evaluate()
. - Change implementation of
LinearElasticLargeStrain
fromNeoHooke
toNeoHookeCompressible
. - Do not invoke
pyvista.start_xvfb()
on a posix-os. If required, run it manually. - Rename
tools._newton.Result
totools._newton.NewtonResult
and add it to the public API astools.NewtonResult
because this class is returned as a result of Newton's method. - Rename the
r
-arguments oftools.force()
andtools.moment()
toforces
. - Rename the
point
-argument oftools.moment()
tocenterpoint
. - Rename the
r
-argument intools.save()
toforces
. Remove the unused argumentconverged
. - Change the default file-extension from
.vtk
to.vtu
intools.save(filename="result.vtu")
. - Change the default values of the gravity vector to zeros if
gravity=None
inSolidBodyGravity(field, gravity=None, density=1.0)
.
Fixed
- Fix
tools.moment()
. Usemath.cross()
. The old implementation was completely wrong!
What's Changed
- Enhance performance of
cdya()
and pass kwargs indot()
by @adtzlr in #593 - Add output location for
field.extract(out=None)
by @adtzlr in #594 - Add
out
-locations to the integral forms and use them in the solid bodies by @adtzlr in #595 - Add
Mesh.update(callback=None)
by @adtzlr in #596 - Do not invoke
pyvista.start_xvfb()
on a posix-os by @adtzlr in #597 - Add
Mesh.imshow()
andFieldContainer.imshow()
by @adtzlr in #598 - Change return value in
job = Job.evaluate()
by @adtzlr in #599 - Add view-methods for solid bodies by @adtzlr in #600
- Change implementation of
LinearElasticLargeStrain
fromNeoHooke
toNeoHookeCompressible
by @adtzlr in #601 - Rename
tools._newton.Result
totools.NewtonResult
by @adtzlr in #603 - Fix
tools.moment(field, forces, boundary, centerpoint=np.zeros(3))
by @adtzlr in #605 - Add
tools.NewtonResult(xnorms=None, fnorms=None)
by @adtzlr in #606 - Rename
tools.save()
-argumentr
toforces
by @adtzlr in #607 - Add new methods to
Mesh
by @adtzlr in #608 - Rename arguments of new
Mesh
-methods by @adtzlr in #609 - Remove
fig
-argument inCharacteristicCurve.plot(ax=None)
by @adtzlr in #610
Full Changelog: v7.13.0...v7.14.0
v7.13.0
[7.13.0] - 2023-12-22
Added
- Add
NeoHookeCompressible
for compressible hyperelastic materials or even as a fast alternative forNeoHooke
when used inSolidBodyIncompressible
.
Changed
- Vectorize
mesh.expand()
which enhances the performance of quad/hex mesh-generators likeRectangle()
andCube()
.
Fixed
- Fix logarithmic strain tensor evaluation in
Job.evaluate(filename="result.xdmf")
and infield.plot("Logarithmic Strain", component=0)
.
What's Changed
- Vectorize
mesh.expand()
by @adtzlr in #584 - Add compressible Neo-Hookean material formulation by @adtzlr in #586
- Fix logarithmic strain tensor evaluation by @adtzlr in #589
Full Changelog: v7.12.0...v7.13.0
v7.12.0
[7.12.0] - 2023-12-05
Added
- Add plot- and screenshot-methods to
Region
andScheme
(base class for quadratures). - Add
item = FormItem(bilinearform, linearform=None)
to be used as an item in aStep(items=[item])
. - Add a new method
Boundary.apply_mask(mask)
. This simplifies re-definitions of boundary conditions with a custommask
. - Add support for two-dimensional dof-based masks in
Boundary(mask)
withmask.shape
of(mesh.npoints, field.dim)
in addition to point-based masks withmask.size
ofmesh.npoints
. - Add a bubble-multiplier argument for
RegionTriangleMINI(mesh, bubble_multiplier=0.1)
andRegionTetraMINI(mesh, bubble_multiplier=0.1)
. - Add
region.reload(mesh, element, quadrature)
to re-evaluate a region, already linked to a field, with a modified mesh or element class or quadrature.
Changed
- Refactor the assembly-submodule. Move the weak-form expression-related classes to the
assembly.expression
submodule. - Move
Basis
to the newassembly.expression
submodule. - Make the
field
-submodule public. - Always
import felupe as fem
in docs and tests. - Change default optional (keyword) arguments of a weak-form expression decorator from
Form(args=(), kwargs={})
toForm(args=None, kwargs=None)
. - Change default value of the skip-argument
Boundary(skip=None)
. This will be set to(False, False, False)
during initialization ifmask=None
. - Change the default bubble-multiplier in
RegionTriangleMINI
andRegionTetraMINI
from 1.0 to 0.1. This affects only the template regions and not the element formulationsTriangleMINI
andTetraMINI
, which still default to a bubble-multiplier of 1.0. - Pass optional keyword-arguments to
math.einsum(**kwargs)
. This enables support for theout
-argument. - Don't broadcast
math.identity()
. - Rename
quadrature/_base.py
toquadrature/_scheme.py
.
Fixed
- Fix
Boundary
and subsequently alsodof.symmetry()
for different dimensions of the mesh and the field. - Fix negative cell-volumes error in
RegionTriangleMINI
for meshes likeRectangle(n=11).triangulate().add_midpoints_faces()
by scaling down the (arbitrary) bubble-multiplier from 1.0 to 0.1.
Removed
- Don't import
Basis
to the global namespace (not necessary as it is used only internally by the weak-Form
expression decorator). - Remove unused internal assemble-methods from
assembly.expression._linear.LinearForm
andassembly.expression._bilinear.BilinearForm
. - Remove extra-index-url
https://wheels.vtk.org
as they are now available on PyPI for Python 3.12.
What's Changed
- Add
Region.plot_scheme()
by @adtzlr in #554 - Add
Region.plot()
andquadrature.Scheme.plot()
by @adtzlr in #556 - Refactor the assembly submodule by @adtzlr in #558
- Change private
_field
to publicfield
submodule by @adtzlr in #560 - Docs and Tests: Always
import felupe as fem
by @adtzlr in #565 - Add
FormItem(bilinearform, linearform=None)
by @adtzlr in #566 - Add
Boundary.apply_mask()
by @adtzlr in #571 Boundary
: Add support for a dof-basedmask
by @adtzlr in #573- VTK-wheels: Remove extra-index-url
https://wheels.vtk.org
by @adtzlr in #574 - Add argument and change default
RegionTriangleMINI(bubble_multiplier=0.1)
, also forRegionTetraMINI
by @adtzlr in #576 - Don't broadcast
math.identity() and add optional kwargs in
math.einsum(**kwargs)` by @adtzlr in #579 - Rename
quadrature/_base.py
toquadrature/_scheme.py
. by @adtzlr in #580 - Add
Region.reload(mesh=None, element=None, quadrature=None)
by @adtzlr in #582
Full Changelog: v7.11.0...v7.12.0
v7.11.0
[7.11.0] - 2023-10-22
Added
- Add cell-type argument to
Mesh.add_midpoints_volumes(cell_type=None)
and its variants for edges and faces. - Add
element.Element.view()
,element.Element.plot()
andelement.Element.screenshot()
. This enables an interactive plot of the element in the reference configuration with its point ids, e.g.Hexahedron().plot().show()
.
Changed
- Change function signature and enhance
dof.biaxial(field, lefts=(None, None), rights=(None, None), moves=(0.2, 0.2), axes=(0, 1), clampes=(False, False), sym=True)
. Now with a full-featured docstring including an example. The old-style inputmove
defaults toNone
, is deprecated and will be removed in the next major release. - Change function signature and enhance
dof.shear(field, bottom=None, top=None, moves=(0.2, 0.0, 0.0), axes=(0, 1), sym=True)
. Now with a full-featured docstring including an example. The old-stylemove
,axis_compression
,axis_shear
andcompression
all default toNone
, are deprecated and will be removed in the next major relase. - Merge keyword-arguments for the dual-regions with hard-coded arguments in
FieldsMixed(region, **kwargs)
. - Replace
np.product()
(will be removed in NumPy 2.0) with the equivalentnp.prod()
.
Fixed
- Fix
FieldsMixed()
for regions with MINI-element formulations: Disable the disconnection of the dual mesh. - Fix
dof.shear(sym=True)
which was previously ignored due to a wrong setup of the symmetry boundaries. - Fix the install command on Python 3.12 by adding an extra-index-url for VTK wheels if they are not yet available on PyPI (the extra index is provided by Kitware).
- Fix a warning because the timings of the Newton-Rhapson solver are printed from a one-dimensional array. Take the first item of the runtime-array to resolve this warning.
Removed
- Remove the undocumented
dof.planar()
because this is a special case of the biaxial load casedof.biaxial(field, clampes=(True, False), moves=(0.2, 0), sym=False, axes=(0, 1))
.
What's Changed
- Enhance loadcase biaxial by @adtzlr in #534
- Remove planar load case by @adtzlr in #535
- Fix
FieldsMixed()
for MINI-elements by @adtzlr in #538 - Fix
dof.shear(sym=True)
by @adtzlr in #540 FieldsMixed(region, **kwargs)
: Mergekwargs
for the dual region by @adtzlr in #541- Add support for Python 3.12 by @adtzlr in #543
- Add element methods view, plot and screenshot by @adtzlr in #551
- Deprecate old-style args of load cases by @adtzlr in #553
Full Changelog: v7.10.0...v7.11.0
v7.10.0
[7.10.0] - 2023-09-14
Added
- Add
ViewField
as method to a field containerFieldContainer.view()
. Now a field container provides the view sub-methods directly, i.e. addFieldContainer.plot()
andFieldContainer.screenshot(filename="mesh.png")
.
Changed
- Hide the undeformed mesh in
Mesh.plot()
by default (also affectsMesh.screenshot()
).
Fixed
- Fix taking screenshots of a mesh.
What's Changed
Full Changelog: v7.9.0...v7.10.0
v7.9.0
[7.9.0] - 2023-09-13
Added
- Add
ViewMesh
as method to a meshMesh.view()
. Now a mesh provides the view sub-methods directly, i.e. addMesh.plot()
andMesh.screenshot(filename="mesh.png")
.
What's Changed
Full Changelog: v7.8.0...v7.9.0
v7.8.0
[7.8.0] - 2023-09-05
Added
- Add
mesh.Triangle(a, b, c, n=2)
for the creation of a quad-meshed triangle.
Changed
- Change
mesh.Circle(n=6)
to the minimummesh.Circle(n=2)
. - Enhance
dof.uniaxial(axis=0, sym=(False, True, False))
by a user-defined axis and selective symmetries. - Enhance
dof.shear(axis_compression=1, axis_shear=0, sym=True)
by user-defined axes of compression and shear.
What's Changed
- Add
mesh.Triangle(a, b, c, n)
by @adtzlr in #526 - Fix
mesh.concatenate()
for a list of length one by @adtzlr in #528 - Enhance uniaxial- and shear-loadcases by @adtzlr in #529
Full Changelog: v7.7.0...v7.8.0
v7.7.0
[7.7.0] - 2023-08-31
Added
- Add optional normalization of mesh runouts (which are then indents) by
mesh.runouts(normalize=False)
. - Add
LinearElasticLargeStrain(E=None, nu=None, parallel=False)
, suitable for large-rotation analyses. This is based onNeoHooke()
with converted Lamé-constants. - Add a simple boundary-based quad- or hex mesher: A mesh tool for filling the face or volume between two line- or quad-meshes
mesh.fill_between(mesh, other_mesh, n=11)
. - Add
Circle(radius, centerpoint, n)
for the creation of a quad-meshed circle.
Changed
- Update the mesh also with a new points array: this changes the Mesh-update function
mesh.update(cells, cell_type=None)
tomesh.update(points=None, cells=None, cell_type=None)
. Note that this could break old scripts which usemesh.update(new_cells)
instead ofmesh.update(cells=new_cells)
. - Move the copy-method of a Mesh
Mesh.copy()
to its base-class and extend it to optionally update the attributesDiscreteGeometry.copy(points=None, cells=None, cell_type=None)
.
Removed
- Remove tests on Python 3.7 (end of life).
What's Changed
- Normalize runouts of meshes
mesh.runouts(normalize=True)
by @adtzlr in #510 - Add
LinearElasticLargeStrain
for linear-elastic materials by @adtzlr in #514 - Add a minimalistic boundary-based quad- or hex-mesh tool by @adtzlr in #519
- Update-method of
Mesh
: Add optional points-argument by @adtzlr in #521 - Move
Mesh.copy()
toDiscreteGeometry.copy()
by @adtzlr in #523 - Add
Circle(radius, centerpoint, n)
for creating quad-meshed circles by @adtzlr in #524
Full Changelog: v7.6.1...v7.7.0