I would like to use dolfinx_materials, but am unable to run the demos provided.
When running the demos/hyperelasticity/heterogeneous_hyperelasticity.py, I get the following error:
WARNING:py.warnings:/home/joep/code/projects/phase-field-framework/dolfinx_materials/demos/hyperelasticity/heterogeneous_hyperelasticity.py:23: DeprecationWarning: This method is deprecated. Use FunctionSpace with an element shape argument instead
V = fem.VectorFunctionSpace(domain, ("CG", order))
Traceback (most recent call last):
File "/home/joep/.local/lib/python3.10/site-packages/dolfinx_materials/material/mfront.py", line 81, in __init__
self.load_behaviour()
File "/home/joep/.local/lib/python3.10/site-packages/dolfinx_materials/material/mfront.py", line 105, in load_behaviour
self.is_finite_strain = mgis_bv.isStandardFiniteStrainBehaviour(
RuntimeError: LibrariesManager::loadLibrary: library 'dolfinx_materials/mfront_materials/src/libBehaviour.so' could not be loaded, (dolfinx_materials/mfront_materials/src/libBehaviour.so: cannot open shared object file: No such file or directory)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/joep/code/projects/phase-field-framework/dolfinx_materials/demos/hyperelasticity/heterogeneous_hyperelasticity.py", line 30, in <module>
material = MFrontMaterial(
File "/home/joep/.local/lib/python3.10/site-packages/dolfinx_materials/material/mfront.py", line 85, in __init__
os.chdir(install_path)
FileNotFoundError: [Errno 2] No such file or directory: 'dolfinx_materials/mfront_materials/'
And when running the plane_elastoplasticity.py demo:
WARNING:py.warnings:/home/joep/code/projects/phase-field-framework/dolfinx_materials/demos/elastoplasticity/plane_elastoplasticity.py:66: DeprecationWarning: This method is deprecated. Use FunctionSpace with an element shape argument instead
V = fem.VectorFunctionSpace(domain, ("CG", order))
Traceback (most recent call last):
File "/home/joep/code/projects/phase-field-framework/dolfinx_materials/demos/elastoplasticity/plane_elastoplasticity.py", line 125, in <module>
qmap = QuadratureMap(domain, deg_quad, material)
File "/home/joep/.local/lib/python3.10/site-packages/dolfinx_materials/quadrature_map.py", line 98, in __init__
self.update_material_properties()
File "/home/joep/.local/lib/python3.10/site-packages/dolfinx_materials/quadrature_map.py", line 134, in update_material_properties
fs_type = get_function_space_type(mat_prop)
File "/home/joep/.local/lib/python3.10/site-packages/dolfinx_materials/utils.py", line 69, in get_function_space_type
shape = x.ufl_shape
AttributeError: 'LinearElasticIsotropic' object has no attribute 'ufl_shape'
I’ve had trouble installing mgis before (and still haven’t managed to get it working in a conda environment), but thought that it is done correctly for my system python. I’m using dolfinx version 0.7.3.
Here are my dolfinx site-packages, where it is clear that the scripts seen from the error above are not present:
Is this still an error with my installation? Any help would be much appreciated!