dokken
February 11, 2024, 7:41pm
2
janduigamer13:
HDF5-DIAG: Error detected in HDF5 (1.10.7) MPI-process 0:
#000: ../../../src/H5F.c line 366 in H5Fcreate(): unable to create file
major: File accessibility
minor: Unable to open file
#001: ../../../src/H5Fint.c line 1713 in H5F_open(): unable to lock the file
major: File accessibility
minor: Unable to lock file
#002: ../../../src/H5FD.c line 1675 in H5FD_lock(): driver lock request failed
major: Virtual File Layer
minor: Unable to lock file
#003: ../../../src/H5FDsec2.c line 990 in H5FD__sec2_lock(): unable to lock file, errno = 11, error message = 'Resource temporarily unavailable'
major: Virtual File Layer
minor: Unable to lock file
Traceback (most recent call last):
File "/home/jandui/Documents/MATH code/AAAAAAAAAAAAa/heat_updated.py", line 40, in <module>
xdmf = io.XDMFFile(domain.comm, "diffusion.xdmf", "w")
RuntimeError: Failed to create HDF5 file.
This usually means that you already have a file named diffusion.h5
, that has been opened by another process and has not been closed. Please check if this is the case, and remove the file.
janduigamer13:
Also, how can I create multiple heat points with specific shapes at the square domain with different functions and constants? (I mean, maybe put two heat sourcers (one at center in a circular domain and another one in the left corner with sin or exponential function, just an example)
Heat sources are covered in
Following my post above, with a minor adaptations, a point source can be implemented as follows:
# Create a point source for Poisson problem
# Author: Jørgen S. Dokken
# SPDX-License-Identifier: MIT
from mpi4py import MPI
from petsc4py import PETSc
import dolfinx
import dolfinx.fem.petsc
import numpy as np
import ufl
def compute_cell_contributions(V, points):
# Determine what process owns a point and what cells it lies within
mesh = V.mesh
_, _, owning_points, cells = dolfinx.cp…