Skip to content

Instantly share code, notes, and snippets.

View jorgensd's full-sized avatar

Jørgen Schartum Dokken jorgensd

View GitHub Profile
@ampdes
ampdes / metadata.md
Last active August 6, 2024 07:56
Meta data of dolfinx objects

Meta data of dolfinx objects

Mesh

Mesh data is constant over time.

  1. Attributes
  • name : name of the mesh
  • dim : geometrical dimension of the mesh
@jorgensd
jorgensd / script.py
Created May 14, 2024 16:01
Write VTK HDF mesh from DOLFINx
# Author: Jørgen S. Dokken
# SPDX-License-Identifier: MIT
from pathlib import Path
from mpi4py import MPI
import h5py
@IgorBaratta
IgorBaratta / helmholtz_pml.py
Last active May 11, 2023 13:36
Helmholtz problem with PML
# Copyright (C) 2023 Igor A. Baratta
# SPDX-License-Identifier: MIT
from functools import partial
import dolfinx
import numpy as np
import scipy.sparse
from dolfinx.fem import Function, FunctionSpace
from dolfinx.io import XDMFFile, gmshio
@jorgensd
jorgensd / Dockerfile
Last active February 16, 2023 12:49
Simple DASH AIS graphical interface
FROM ubuntu:22.04
ENV DEB_PYTHON_INSTALL_LAYOUT=deb_system
RUN apt-get update && \
apt-get install -q -y python3-pip
RUN python3 -m pip install --upgrade pip setuptools
RUN python3 -m pip install vaex dash numpy

Install Instructions

Clone spack:

git clone https://github.com/spack/spack.git

Selecting Modules

#!/bin/bash
@jorgensd
jorgensd / bash_commands.md
Last active February 27, 2025 08:13
Commands for bash file for rebuilding dolfinx/dolfinx-mpc

Bash commands

compile_demo(){
    cmake -G Ninja -B build-dir-${DOLFINX_MODE}${DOLFINX_PRECISION} -DCMAKE_BUILD_TYPE=${DOLFINX_CMAKE_BUILD_TYPE} -DCMAKE_CXX_FLAGS="${DOLFINX_CMAKE_CXX_FLAGS}" . && ninja -j8 -C build-dir-${DOLFINX_MODE}${DOLFINX_PRECISION}
}

rebuild(){
    BASEDIR=$(pwd)
    cd /root/shared/"$1"