grinsfem / grins

Multiphysics Finite Element package built on libMesh
http://grinsfem.github.io
Other
47 stars 39 forks source link

Can not be compiled with libMesh 1.7.0-pre #598

Closed ehsanakrami closed 3 years ago

ehsanakrami commented 3 years ago

I tried to compile it alongside libMesh 1.7.0-pre and the problem started from this line:

../../src/physics/src/overlapping_fluid_solid_map.C: In member function 'void GRINS::OverlappingFluidSolidMap::swap_old_solution(GRINS::MultiphysicsSystem&)': ../../src/physics/src/overlapping_fluid_solid_map.C:287:93: error: no matching function for call to 'swap(std::shared_ptr<libMesh::NumericVector >&, std::unique_ptr<libMesh::NumericVector >&)' std::swap( unsteady_solver->old_local_nonlinear_solution, system.current_local_solution );

while I have tested with libMesh 1.6.0 and there was no problem.

roystgnr commented 3 years ago

Looks like https://github.com/libMesh/libmesh/commit/2693d44bc06d6df79481e2641146cd2e583356a0 broke this behavior. And that commit was a bug fix, if not for a particularly serious bug, so we don't want to revert it. Could you try changing the offending GRINS line to unsteady_solver->old_local_nonlinear_solution->swap(*system.current_local_solution); and see if that fixes things? If so then we'll patch GRINS with that right away; that fix should be backwards compatible with older libMesh too. If not ... I'm technically on vacation (read: busy with family stuff) for a couple more weeks, but I'll try to make time in there to look into this more deeply.

ehsanakrami commented 3 years ago

Unfortunately, the proposed solution did not work!

roystgnr commented 3 years ago

Looks like it just needed another header include to bring in the definition of NumericVector::swap().

Could you give #599 a try?

ehsanakrami commented 3 years ago

Hi @roystgnr. It is working now perfectly. Thank you for your support.

roystgnr commented 3 years ago

No problem; thanks for the report!