How to run the demos in pulse-adjoint?


257
views
0
5 months ago by
Sara  
Hello Everybody,

I have downloaded and installed the pulse- adjoint from https://bitbucket.org/finsberg/pulse_adjoint/downloads/.

When I run the demo demo-passive-filling.py in the demo directory, I get the following error message:

/usr/local/lib/python2.7/dist-packages/h5py-2.7.1-py2.7-linux-x86_64.egg/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
/usr/local/lib/python2.7/dist-packages/h5py-2.7.1-py2.7-linux-x86_64.egg/h5py/__init__.py:68: UserWarning: h5py is running against HDF5 1.8.16 when it was built against 1.8.18, this may cause problems
'{0}.{1}.{2}'.format(*version.hdf5_built_version_tuple)

Load mesh from h5
Traceback (most recent call last):
File "demo_passive_filling.py", line 23, in <module>
patient = LVTestPatient()
File "/usr/local/lib/python2.7/dist-packages/pulse_adjoint-1.0-py2.7.egg/pulse_adjoint/patient_data/patient.py", line 300, in __init__
TestPatient.__init__(self, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pulse_adjoint-1.0-py2.7.egg/pulse_adjoint/patient_data/patient.py", line 279, in __init__
self._load_geometry(**{"include_sheets":True})
File "/usr/local/lib/python2.7/dist-packages/pulse_adjoint-1.0-py2.7.egg/pulse_adjoint/patient_data/patient.py", line 236, in _load_geometry
**kwargs)
File "/usr/local/lib/python2.7/dist-packages/pulse_adjoint-1.0-py2.7.egg/pulse_adjoint/patient_data/load.py", line 104, in load_geometry
include_sheets)
File "/usr/local/lib/python2.7/dist-packages/mesh_generation/mesh_utils.py", line 354, in load_geometry_from_h5
h5file.read(mesh, mgroup, True)
File "/usr/local/lib/python2.7/dist-packages/fenics_adjoint/types/io.py", line 14, in HDF5File_read
func.create_block_variable()
AttributeError: 'Mesh' object has no attribute 'create_block_variable'
Aborted (core dumped)


I was wondering how this issue should be solved.
Can this be related to the version of Dolfin-adjoint and FEniCS installed on my computer? The FEniCS on my computer is 2017.2.0, and the dolfin-adjoint is installed from http://www.dolfin-adjoint.org/en/latest/download/index.html
which seems to be a 2017.2 version. If the version should be changed, please let me know how I can download and install other versions.

Thanks,
Sara
Community: FEniCS Project

2 Answers


2
7 weeks ago by
Hi Sara,
I am sorry for all the messy hdf5 dependencies.
I have now created a new repo called pulse (https://github.com/finsberg/pulse)
which is a pure mechanics solver and which is probably more suited your needs.
This should also work with fenics 2017 version.
0
5 months ago by
Ovais  
I have faced similar issues when i tried to run cbc beat. Most issues are caused due to dolfin-adjoint version and fenics versions. You can try following version of dolfin adjoint:- (any one out of these should work for win 7 download through docker)

docker run -ti -v $(pwd):/home/fenics/shared quay.io/dolfinadjoint/dolfin-adjoint:1.6.0 stable
or
docker run -ti -v $(pwd):/home/fenics/shared quay.io/dolfinadjoint/dolfin-adjoint:1.6.0

Pulse adjoint repo mentions fenics version 2016 and dolfin adjoint 2016. These demos are sensitive to versions of fenics and dolfin adjoint etc. You have to make sure that you install the correct version. If everything fails... mail the author at henriknf@simula.no ...he is very helping and would definitely suggest a better way out.

Best regards
Hi Ovais,

Thank you very much for your reply. I am using these codes on a Linux system, and installed everything directly without using docker. I was wondering if you know how I can access and install the older versions of FEniCS and dolfin-adjoint without using the docker.

Thanks,
Sara
written 5 months ago by Sara  
this post may help you.... https://fenicsproject.org/qa/10955/install-fenics-2016-1-0-on-linux-mint/
written 5 months ago by Ovais  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »