There seems to be some confusion here. What is the definition of lambda in this problem? If eta is being solved for, why does the second equation specify “for every eta…”?
I am still confused about the variational formulation. Why does the function f defined over Omega not show up in the variational problem? Did you leave something out?
Can someone please explain to me what a partitioner is and what create_cell_partitioner is doing? Also, if I will not be using multiple processors on my machine, is the argument dolfinx.mesh.GhostMode.shared_facet still necessary?
I am trying to run tutorial 3 in multiphenicsx and I have hit the following problem in
# Split the block solution in components
(u1, u2, l) = (dolfinx.fem.Function(V1), dolfinx.fem.Function(V2), dolfinx.fem.Function(M))
with multiphenicsx.fem.petsc.BlockVecSubVectorWrapper(
u1u2l, [V1.dofmap, V2.dofmap, M.dofmap], restriction) as u1u2l_wrapper:
for u1u2l_wrapper_local, component in zip(u1u2l_wrapper, (u1, u2, l)):
with component.x.petsc_vec.localForm() as component_local:
component_local[:] = u1u2l_wrapper_local
u1u2l.destroy()
Here is the diagnostic I get
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[46], line 6
3 with multiphenicsx.fem.petsc.BlockVecSubVectorWrapper(
4 u1u2l, [V1.dofmap, V2.dofmap, M.dofmap], restriction) as u1u2l_wrapper:
5 for u1u2l_wrapper_local, component in zip(u1u2l_wrapper, (u1, u2, l)):
----> 6 with component.x.petsc_vec.localForm() as component_local:
7 component_local[:] = u1u2l_wrapper_local
8 u1u2l.destroy()
AttributeError: 'Vector' object has no attribute 'petsc_vec'
You probably haven’t followed the instructions at Installation — multiphenicsx . My guess is that you are using the tutorials from the main branch (i.e, dolfinx dev version), but you have installed a dolfinx release around 0.7.*.
I apologize in advance for my ignorance on these issues. Here is what I have done: I created a new environment in which I installed fenicsx9. When I try to execute
git clone GitHub - multiphenics/multiphenicsx: multiphenicsx - easy prototyping of multiphysics problems in FEniCSx
I get the message
fatal: destination path ‘multiphenicsx’ already exists and is not an empty directory.
This is presumably because I already downloaded multipenicsx previously and created the directory at that time. However, now if I try to execute
The error says it all. There are some dependencies missing: please try to have a look at how you can install them within your environment (I guess a conda one, so look if there are conda packages for that: can’t tell you by heart because I am not a conda user).
That’ typically means that you have a mismatch between the nanobind version that was used to build dolfinx within conda, and the one that you installed locally.
Can you check which version of nanobind was used in conda? How did you install nanobind in your environment?
suggestion would be to never mix up pip installed wheels and conda packages, hence install nanbobind and skbuild from conda. However, I wouldn’t know how to do that in a way that guarantees that you get the same versions used at dolfinx 0.9.0 build time, cc @minrk for help
if you install nanobind with conda, dolfinx has a constraint that should ensure you get the right version:
mamba install fenics-dolfinx=0.9 nanobind
gets you nanobind 2.1 today
mamba install fenics-dolfinx=0.9 nanobind=2.2
(correctly) refuses to install with a conflict:
The following packages are incompatible
├─ fenics-dolfinx 0.9** is installable and it requires
│ └─ fenics-basix-nanobind-abi 0.2.1.17 , which requires
│ └─ nanobind 2.1.* , which can be installed;
└─ nanobind 2.2** is not installable because it conflicts with any installable versions previously reported.
(fenicsx9) dannyb@dannyslaptop:~/multiphenicsx$ mamba install fenics-dolfinx=0.9 nanobind
Command 'mamba' not found, did you mean:
command 'samba' from deb samba (2:4.15.13+dfsg-0ubuntu1.6)
Try: sudo apt install <deb name>