Skip to content

Commit

Permalink
update to doflinx v0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
arvedes committed Jun 22, 2022
1 parent 3cface3 commit a5c28d0
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 26 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
<img src="https://github.com/precice/fenicsx-adapter/actions/workflows/pythonpublish.yml/badge.svg" alt="Upload Python Package">
</a>

**🚧 Note the fenicsx-adapter is under construction. Our current version of FEniCS-X that we use for development is [`3584702`](https://github.com/FEniCS/dolfinx/commit/358470227bf9b7dea179fca52fbd36182a277010) 🚧**

preCICE-adapter for the open source computing platform FEniCSx.

Notes:

* This adapter is a fork from the original [FEniCS-preCICE adapter](https://github.com/precice/fenics-adapter). Based on [v1.2.0](https://github.com/precice/fenics-adapter/releases/tag/v1.2.0).
* This adapter is currently under development and experimental.
* Target version: dolfinx v0.4.1

## Installing the package

Expand Down
46 changes: 24 additions & 22 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -312,28 +312,30 @@ RUN wget -nc --quiet https://slepc.upv.es/download/distrib/slepc-${SLEPC_VERSION
WORKDIR /root

# get FEniCSx
# ARG FENICS_VERSION=v0.3.0
# ARG UFL_VERSION=2021.1.0
# RUN git clone -b ${FENICS_VERSION} --single-branch https://github.com/FEniCS/dolfinx.git && \
# git clone -b ${FENICS_VERSION} --single-branch https://github.com/FEniCS/basix.git && \
# git clone -b ${UFL_VERSION} --single-branch https://github.com/FEniCS/ufl.git && \
# git clone -b ${FENICS_VERSION} --single-branch https://github.com/FEniCS/ffcx.git
RUN git clone https://github.com/FEniCS/dolfinx.git && \
cd dolfinx && \
git checkout 358470227bf9b7dea179fca52fbd36182a277010 && \
cd .. && \
git clone https://github.com/FEniCS/basix.git && \
cd basix && \
git checkout a5dc28dc4ed33e12518d8460b9d85b9f2da108d8 && \
cd .. && \
git clone https://github.com/FEniCS/ufl.git && \
cd ufl && \
git checkout 1de7f12a2677a3a0c48cf0acd45e43a13de93b28 && \
cd .. && \
git clone https://github.com/FEniCS/ffcx.git && \
cd ffcx && \
git checkout e4e9991af51bbe39bec9a82b62b2987fe3a0c0e4 && \
cd ..
ARG DOLFINX_VERSION=v0.4.1
ARG BASIX_VERSION=v0.4.2
ARG UFL_VERSION=2022.1.0
ARG FFCX_VERSION=v0.4.2
RUN git clone -b ${DOLFINX_VERSION} --single-branch https://github.com/FEniCS/dolfinx.git && \
git clone -b ${BASIX_VERSION} --single-branch https://github.com/FEniCS/basix.git && \
git clone -b ${UFL_VERSION} --single-branch https://github.com/FEniCS/ufl.git && \
git clone -b ${FFCX_VERSION} --single-branch https://github.com/FEniCS/ffcx.git
# RUN git clone https://github.com/FEniCS/dolfinx.git && \
# cd dolfinx && \
# git checkout 358470227bf9b7dea179fca52fbd36182a277010 && \
# cd .. && \
# git clone https://github.com/FEniCS/basix.git && \
# cd basix && \
# git checkout a5dc28dc4ed33e12518d8460b9d85b9f2da108d8 && \
# cd .. && \
# git clone https://github.com/FEniCS/ufl.git && \
# cd ufl && \
# git checkout 1de7f12a2677a3a0c48cf0acd45e43a13de93b28 && \
# cd .. && \
# git clone https://github.com/FEniCS/ffcx.git && \
# cd ffcx && \
# git checkout e4e9991af51bbe39bec9a82b62b2987fe3a0c0e4 && \
# cd ..

ARG DOLFINX_CMAKE_BUILD_TYPE="RelWithDebInfo"
# install
Expand Down
5 changes: 3 additions & 2 deletions tutorials/partitioned-heat-conduction/fenicsx/heat.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@

from __future__ import print_function, division
from mpi4py import MPI
from dolfinx.fem import Function, FunctionSpace, Expression, Constant, dirichletbc, locate_dofs_geometrical, LinearProblem
from dolfinx.fem import Function, FunctionSpace, Expression, Constant, dirichletbc, locate_dofs_geometrical
from dolfinx.fem.petsc import LinearProblem
from dolfinx.io import XDMFFile
from ufl import TrialFunction, TestFunction, dx, ds, dot, grad, inner, lhs, rhs, FiniteElement, VectorElement
from fenicsxprecice import Adapter
Expand Down Expand Up @@ -83,7 +84,7 @@ def determine_gradient(V_g, u):
vector_element = VectorElement("P", mesh.ufl_cell(), 1)
V = FunctionSpace(mesh, scalar_element)
V_g = FunctionSpace(mesh, vector_element)
W = V_g.sub(0).collapse()
W = V_g.sub(0).collapse()[0]

# Define boundary conditions

Expand Down

0 comments on commit a5c28d0

Please sign in to comment.