Installed FEniCS Mechanics via anaconda. Ran example codes from tutorial. When ran fourth example " Time-dependent Anisotropic Material" given in the tutorial; Few initial lines printed:
Solving nonlinear variational problem.
Newton iteration 0: r (abs) = 0.000e+00 (tol = 1.000e-10) r (rel) = -nan (tol = 1.000e-09)
Newton solver finished in 0 iterations and 0 linear solver iterations.
t = 0.010000
Solving nonlinear variational problem.
Newton iteration 0: r (abs) = 1.801e+00 (tol = 1.000e-10) r (rel) = 1.000e+00 (tol = 1.000e-09)
Then following line keeps on getting printed:
OpenBLAS Warning : Detect OpenMP Loop and this application may hang. Please rebuild the library with USE_OPENMP=1 option.
When debugged, solver.full_solve()
last line in examples caused it. Stepped into it and “step” function in BaseMechanicsSolver class from basemechanics.py file was last called.
import fenicsmechanics as fm
mesh_file = fm.get_mesh_file_names("ellipsoid", refinements="1000um", ext="h5")
mat_dict = {
'const_eqn': 'guccione',
'type': 'elastic',
'incompressible': True,
'density': 0.0,
'bt': 1.0,
'bf': 1.0,
'bfs': 1.0,
'C': 10.0,
'fibers': {
'fiber_files': mesh_file,
'fiber_names': [['fib1', 'fib2', 'fib3'],
['she1', 'she2', 'she3']],
'elementwise': True
}
}
mesh_dict = {
'mesh_file': mesh_file,
'boundaries': mesh_file
}
formulation_dict = {
'time': {
'dt': 0.01,
'interval': [0., 1.]
},
'element': 'p2-p1',
'domain': 'lagrangian',
'bcs':{
'dirichlet': {
'displacement': [[0., 0., 0.]],
'regions': [10], # Integer ID for base plane
},
'neumann': {
'regions': [20], # Integer ID for inner surface
'types': ['pressure'],
'values': ['10.0*t']
}
}
}
config = {
'material': mat_dict,
'mesh': mesh_dict,
'formulation': formulation_dict
}
problem = fm.SolidMechanicsProblem(config)
solver = fm.SolidMechanicsSolver(problem, fname_disp='results/displacement.pvd')
solver.set_parameters(linear_solver="superlu_dist")
solver.full_solve()