Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
build-and-test:
runs-on: ubuntu-latest
container: ghcr.io/fenics/dolfinx/dolfinx:nightly
container: ghcr.io/fenics/dolfinx/dolfinx:v0.10.0-r1
steps:
- name: Checkout
uses: actions/checkout@v5
Expand Down
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ numerical methods for solving a wide range of thin structural models (beams,
plates and shells) expressed in the Unified Form Language (UFL) of the FEniCS
Project.

*FEniCSx-Shells is an experimental version targeting version v0.10.0.dev0 of the new
*FEniCSx-Shells is an experimental version targeting version v0.10.0 of the new
[DOLFINx solver](https://github.com/fenics/dolfinx).*

The foundational aspects of the FEniCS-Shells project are described in the paper:
Expand All @@ -22,6 +22,20 @@ code generation tools, J. S. Hale, M. Brunetti, S. P. A. Bordas, C. Maurini.
Computers & Structures, 209, 163-181,
[doi:10.1016/j.compstruc.2018.08.001](https://doi.org/10.1016/j.compstruc.2018.08.001).

## Installation

See the [DOLFINx README -
Installation](https://github.com/FEniCS/dolfinx/blob/main/README.md#installation) for
instructions on installing DOLFINx with petsc4py support.

Then:

pip install fenicsx-shells[demos]@git+https://github.com/FEniCS-Shells/fenicsx-shells.git

At the current time, the `fenicsx-shells` module is empty, and the content of
the 'library' is in the demos. This may change as we begin implementing e.g.
custom assemblers.

## Documentation

The documentation can be viewed [here](https://fenics-shells.github.io/fenicsx-shells).
Expand All @@ -33,8 +47,6 @@ FEniCSx-Shells currently includes implementations of the following structural mo
* Reissner-Mindlin plates.
* Kirchhoff-Love plates.

A roadmap for future developments will be shared soon.

We are using a variety of numerical techniques for discretising the PDEs
including:

Expand Down
1 change: 1 addition & 0 deletions demo/demo_kirchhoff-love-clamped.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ def all_boundary(x):
L,
bcs=bcs,
petsc_options={"ksp_type": "preonly", "pc_type": "lu", "pc_factor_mat_solver_type": "mumps"},
petsc_options_prefix="problem_",
)
u_h = problem.solve()

Expand Down
11 changes: 6 additions & 5 deletions demo/demo_nonlinear-naghdi-clamped-semicylinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#
# %%
import typing
import warnings
from pathlib import Path

# %%
Expand All @@ -45,11 +46,13 @@
from dolfinx.fem import Expression, Function, dirichletbc, functionspace, locate_dofs_topological
from dolfinx.fem.bcs import DirichletBC
from dolfinx.fem.function import Function as _Function
from dolfinx.fem.petsc import NonlinearProblem, apply_lifting, assemble_vector, set_bc
from dolfinx.fem.petsc import NewtonSolverNonlinearProblem, apply_lifting, assemble_vector, set_bc
from dolfinx.mesh import CellType, create_rectangle, locate_entities_boundary
from dolfinx.nls.petsc import NewtonSolver
from ufl import grad, inner, split

warnings.simplefilter("default", DeprecationWarning)

# %% [markdown]
# We consider a semi-cylindrical shell of radius $r$ and axis length $L$. The
# shell is made of a linear elastic isotropic homogeneous material with Young
Expand Down Expand Up @@ -545,9 +548,7 @@ def compute_cell_contributions(V, points):
at that point"""
# Determine what process owns a point and what cells it lies within
mesh = V.mesh
point_ownership_data = dolfinx.cpp.geometry.determine_point_ownership(
mesh._cpp_object, points, 1e-6
)
point_ownership_data = dolfinx.geometry.determine_point_ownership(mesh, points, 1e-6)

owning_points = np.asarray(point_ownership_data.dest_points).reshape(-1, 3)
cells = point_ownership_data.dest_cells
Expand Down Expand Up @@ -589,7 +590,7 @@ def compute_cell_contributions(V, points):
# We define a custom `NonlinearProblem` which is able to include the point
# force.
# %%
class NonlinearProblemPointSource(NonlinearProblem):
class NonlinearProblemPointSource(NewtonSolverNonlinearProblem):
def __init__(
self,
F: ufl.form.Form,
Expand Down
1 change: 1 addition & 0 deletions demo/demo_reissner-mindlin-clamped-tdnns.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ def all_boundary(x):
L,
bcs=bcs,
petsc_options={"ksp_type": "preonly", "pc_type": "lu", "pc_factor_mat_solver_type": "mumps"},
petsc_options_prefix="problem_",
)
u_h = problem.solve()

Expand Down
1 change: 1 addition & 0 deletions demo/demo_reissner-mindlin-clamped.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ def all_boundary(x):
-F,
bcs=bcs,
petsc_options={"ksp_type": "preonly", "pc_type": "lu", "pc_factor_mat_solver_type": "mumps"},
petsc_options_prefix="problem_",
)
u_ = problem.solve()

Expand Down
1 change: 1 addition & 0 deletions demo/demo_reissner-mindlin-simply-supported.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ def make_bc(value, V, on_boundary):
-F,
bcs=bcs,
petsc_options={"ksp_type": "preonly", "pc_type": "lu", "pc_factor_mat_solver_type": "mumps"},
petsc_options_prefix="problem_",
)
u_ = problem.solve()

Expand Down
2 changes: 1 addition & 1 deletion launch-container.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
CONTAINER_ENGINE="podman"
${CONTAINER_ENGINE} run -ti -v $(pwd):/shared -w /shared dolfinx/dolfinx:nightly
${CONTAINER_ENGINE} run --rm -ti -v $(pwd):/shared -w /shared dolfinx/dolfinx:v0.10.0-r1
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ authors = [
{ name = "Jack S. Hale", email = "[email protected]" },
{ name = "Tian Yang" }
]
# Get UFL, FFCx and Basix through transitive dependency on fenics-dolfinx.
dependencies = [
"fenics-dolfinx>=0.10.0.dev0,<0.11.0",
"fenics-dolfinx>=0.10.0,<0.11.0",
]

[project.optional-dependencies]
Expand Down