Parent mesh is a 2x1 unit square mesh Submesh for cells is full mesh Submesh for facets is single facet on left side.
Testing various ways of computing the product of two functions on the common boundary (single facet)
import dolfin | |
import numpy as np | |
class Walls(dolfin.SubDomain): | |
def inside(self, x, on_boundary): | |
return on_boundary | |
class Inlet(dolfin.SubDomain): | |
def inside(self, x, on_boundary): | |
return on_boundary and dolfin.near(x[2], 0.0, 1e-6) |
# Author: Jørgen S. Dokken | |
# SPDX-License-Identifier: MIT | |
from pathlib import Path | |
from mpi4py import MPI | |
import h5py |
# Description: Minimal working example of PETSc logging with custom decorators | |
# Author: Henrik Finsberg and Jørgen S. Dokken | |
# SPDX-License-Identifier: MIT | |
import time | |
import numpy as np | |
import petsc4py | |
import argparse | |
class CustomFormatter(argparse.ArgumentDefaultsHelpFormatter, argparse.RawTextHelpFormatter): |
Parent mesh is a 2x1 unit square mesh Submesh for cells is full mesh Submesh for facets is single facet on left side.
Testing various ways of computing the product of two functions on the common boundary (single facet)
*.xdmf | |
*.h5 |
# Can be built with | |
# docker build --build-arg="PETSC_VERSION=3.18.5" --build-arg="PETSC_SLEPC_OPTFLAGS=-O2" -t test_petsc3185_o2 . --progress=plain | |
# docker build --build-arg="PETSC_VERSION=3.19.6" --build-arg="PETSC_SLEPC_OPTFLAGS=-O2" -t test_petsc3196_o2 . --progress=plain | |
# docker build --build-arg="PETSC_VERSION=3.20.0" --build-arg="PETSC_SLEPC_OPTFLAGS=-O2" -t test_petsc3200_o2 . --progress=plain | |
# docker build --build-arg="PETSC_VERSION=3.20.3" --build-arg="PETSC_SLEPC_OPTFLAGS=-O2" -t test_petsc3203_o2 . --progress=plain | |
FROM ubuntu:22.04 as base | |
repo_stats |
FROM ubuntu:22.04 | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update && \ | |
apt-get install -y software-properties-common | |
RUN apt-get install -y git \ | |
cmake \ | |
g++ \ | |
libgmp-dev |
# Local solver using Scipy | |
# To be used with DOLFINx and a local-assembler | |
# | |
# Author: Jørgen S. Dokken | |
# | |
# License: MIT | |
import scipy | |
import scipy.linalg | |
import numpy |