Hello,
I have a question regarding this tutorial:
Coupling PDEs of multiple dimensions
I have used the same approach outlined in this tutorial to address my problem of solving partial differential equations (PDEs) in both 2D and 1D domains and coupling them together. Specifically, I need to solve an equation that closely resembles the Poisson equation on a 1D domain, which serves as one of the boundaries of the 2D domain. Here is what I have:
∇2ψ=f(x)
Then, in variational form, I have:
ufl.inner(ufl.grad(psi), ufl.grad(w)) * ds
I attempted to follow the tutorial mentioned earlier by adding the above terms into the variational form. However, I am encountering an error when I try to form and extract the residuals.
Code:
F = alpha * ufl.inner(sigma(u, mu, lmbda), epsilon(v)) * dx
F -= alpha * ufl.inner(f, v) * dx
F += -ufl.inner(psi - psi_k, ufl.dot(v, n)) * ds
F += ufl.inner(ufl.dot(u, n_g), w) * ds
F += ufl.inner(ufl.exp(psi), w) * ds - ufl.inner(g, w) * ds
F += ufl.inner(ufl.grad(psi), ufl.grad(w)) * ds # Addiotinal term for Poisson equation
residual = dolfinx.fem.form(ufl.extract_blocks(F), entity_maps=entity_maps)
Error when running in debug mode on the last line of the previous code
Exception has occurred: VerificationError
CompileError: command '/usr/bin/gcc' failed with exit code 1
subprocess.CalledProcessError: Command '['/usr/bin/gcc', '-pthread', '-B', '/home/phavaej/anaconda3/envs/fenicsx-env/compiler_compat', '-fno-strict-overflow', '-Wsign-compare', '-DNDEBUG', '-O2', '-Wall', '-fPIC', '-O2', '-isystem', '/home/phavaej/anaconda3/envs/fenicsx-env/include', '-fPIC', '-O2', '-isystem', '/home/phavaej/anaconda3/envs/fenicsx-env/include', '-fPIC', '-I/home/phavaej/anaconda3/envs/fenicsx-env/lib/python3.12/site-packages/ffcx/codegeneration', '-I/home/phavaej/anaconda3/envs/fenicsx-env/include/python3.12', '-c', 'libffcx_forms_bd87454e19278e453f4db79408a381bd7f579eaf.c', '-o', './libffcx_forms_bd87454e19278e453f4db79408a381bd7f579eaf.o', '-std=c17', '-O2', '-g0']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
distutils.errors.DistutilsExecError: command '/usr/bin/gcc' failed with exit code 1
During handling of the above exception, another exception occurred:
distutils.errors.CompileError: command '/usr/bin/gcc' failed with exit code 1
During handling of the above exception, another exception occurred:
File "/home/phavaej/Fenics/test_interpolation_block_coupling/coupling_example_org.py", line 132, in <module>
residual = dolfinx.fem.form(ufl.extract_blocks(F), entity_maps=entity_maps)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cffi.VerificationError: CompileError: command '/usr/bin/gcc' failed with exit code 1
I think this issue may be related to the dimensions or accessing the correct subspace of the mixed domain, but I struggled to resolve it. I am using dolphinx v 0.9.
I would greatly appreciate any help and guidance on this.
Kind regards,
Peyman