Hello @Makis,
This thread had been up for many time so it can be easily confusing for the both of us !
You are right, let us focus on the coupling. I wanted to run a tutorial case with the brand new installation before going back to my OF-OF coupling code.
The 34th post and those before are about my OF-OF coupling. Both Solid and Fluid folders have an OpenFOAM-like structure because the fluid motion is solved by pimpleFoam and the solid motion is solved by solidFoam.
On the other hand, this post and the last one are about this tutorial case, namely “flap_perp” that is available in precice’s tutorials. I want to perform correctly this simulation to be sure everything is fine before going back to my OF-OF code. It should not take long.
I successfully compiled the OF-adapter that we mentionned in this post. Then I followed the instructions on this page and successfully compiled the linear solver of the dealii-adapter. Unfortunately it is not working for the nonlinear solver. This is what I get:
$ cmake -DDEAL_II_DIR=../../dealii/build . -- Build type: Release -- Autopilot invoked -- Run $ make info to print a detailed help message -- Configuring done -- Generating done -- Build files have been written to: /home/tdg/OpenFOAM/precice/dealii-adapter/nonlinear_elasticity
and
$ make -j10
[ 50%] Building CXX object CMakeFiles/nonlinear_elasticity.dir/nonlinear_elasticity.cc.o
/home/tdg/OpenFOAM/precice/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc: In member function ‘void Nonlinear_Elasticity::Solid<dim, NumberType>::system_setup()’:
/home/tdg/OpenFOAM/precice/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:624:34: error: missing template arguments before ‘(’ token
state_variables = std::vector({&total_displacement,
^
/home/tdg/OpenFOAM/precice/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc: In member function ‘void Nonlinear_Elasticity::Solid<dim, NumberType>::make_constraints(const int&)’:
/home/tdg/OpenFOAM/precice/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1359:50: error: ‘ZeroFunction’ was not declared in this scope
ZeroFunction(
^~~~~~~~~~~~
/home/tdg/OpenFOAM/precice/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1359:50: note: suggested alternative:
In file included from /home/tdg/OpenFOAM/precice/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1:
/mnt/datasim/OpenFOAM/precice/dealii/include/deal.II/base/function.h:510:9: note: ‘dealii::Functions::ZeroFunction’
class ZeroFunction : public ConstantFunction<dim, RangeNumberType>
^~~~~~~~~~~~
/home/tdg/OpenFOAM/precice/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1366:50: error: ‘ZeroFunction’ was not declared in this scope
ZeroFunction(
^~~~~~~~~~~~
/home/tdg/OpenFOAM/precice/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1366:50: note: suggested alternative:
In file included from /home/tdg/OpenFOAM/precice/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1:
/mnt/datasim/OpenFOAM/precice/dealii/include/deal.II/base/function.h:510:9: note: ‘dealii::Functions::ZeroFunction’
class ZeroFunction : public ConstantFunction<dim, RangeNumberType>
^~~~~~~~~~~~
/home/tdg/OpenFOAM/precice/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1383:13: error: ‘ZeroFunction’ was not declared in this scope
ZeroFunction(n_components),
^~~~~~~~~~~~
/home/tdg/OpenFOAM/precice/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1383:13: note: suggested alternative:
In file included from /home/tdg/OpenFOAM/precice/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1:
/mnt/datasim/OpenFOAM/precice/dealii/include/deal.II/base/function.h:510:9: note: ‘dealii::Functions::ZeroFunction’
class ZeroFunction : public ConstantFunction<dim, RangeNumberType>
^~~~~~~~~~~~
/home/tdg/OpenFOAM/precice/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1390:13: error: ‘ZeroFunction’ was not declared in this scope
ZeroFunction(n_components),
^~~~~~~~~~~~
/home/tdg/OpenFOAM/precice/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1390:13: note: suggested alternative:
In file included from /home/tdg/OpenFOAM/precice/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1:
/mnt/datasim/OpenFOAM/precice/dealii/include/deal.II/base/function.h:510:9: note: ‘dealii::Functions::ZeroFunction’
class ZeroFunction : public ConstantFunction<dim, RangeNumberType>
^~~~~~~~~~~~
make[2]: *** [CMakeFiles/nonlinear_elasticity.dir/build.make:63: CMakeFiles/nonlinear_elasticity.dir/nonlinear_elasticity.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:201: CMakeFiles/nonlinear_elasticity.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
At the present moment, I don’t understand this error.
Meanwhile I also merged the pull request of @JSeuffert so once this little issue with the OF-adapter is gone, I can rework on my code. I have one remark about this: When I first studied and integrated the change of @JSeuffert, I noticed the Make/files and several other headers (Adapter.H I do believe) were including volDisplacement.H and volDisplacementDelta.H which were not present in the last commits. I remember I had to manually add them by browsing the list of commits. It looks these two files have been removed from the list of files “to watch” when comitting. All of this to say that I had the same issue after directly merging the pull request: The two files are not there and the compiler complains.
wmake_of_OF-adapter.log (4.7 KB)
EDIT: Your last remark about the reference/copy of a field seems likely to be what is happening; Once the other things are sorted, I will take a long into this.