Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-linear solver does not compile #30

Closed
MakisH opened this issue Jun 26, 2020 · 2 comments · Fixed by #31
Closed

Non-linear solver does not compile #30

MakisH opened this issue Jun 26, 2020 · 2 comments · Fixed by #31

Comments

@MakisH
Copy link
Member

MakisH commented Jun 26, 2020

In the latest state of develop (as well as of master), the non-linear solver does not compile, reporting:

$ make 
Scanning dependencies of target nonlinear_elasticity
[ 50%] Building CXX object CMakeFiles/nonlinear_elasticity.dir/nonlinear_elasticity.cc.o
/home/makish/github/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc: In member function ‘void Nonlinear_Elasticity::Solid<dim, NumberType>::system_setup()’:
/home/makish/github/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:624:34: error: missing template arguments before ‘(’ token
     state_variables = std::vector({&total_displacement,
                                  ^
/home/makish/github/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc: In member function ‘void Nonlinear_Elasticity::Solid<dim, NumberType>::make_constraints(const int&)’:
/home/makish/github/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1359:50: error: ‘ZeroFunction’ was not declared in this scope
                                                  ZeroFunction<dim>(
                                                  ^
/home/makish/github/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1359:50: note: suggested alternative:
In file included from /home/makish/github/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1:0:
/usr/local/include/deal.II/base/function.h:510:9: note:   ‘dealii::Functions::ZeroFunction’
   class ZeroFunction : public ConstantFunction<dim, RangeNumberType>
         ^
/home/makish/github/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1366:50: error: ‘ZeroFunction’ was not declared in this scope
                                                  ZeroFunction<dim>(
                                                  ^
/home/makish/github/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1366:50: note: suggested alternative:
In file included from /home/makish/github/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1:0:
/usr/local/include/deal.II/base/function.h:510:9: note:   ‘dealii::Functions::ZeroFunction’
   class ZeroFunction : public ConstantFunction<dim, RangeNumberType>
         ^
/home/makish/github/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1383:13: error: ‘ZeroFunction’ was not declared in this scope
             ZeroFunction<dim>(n_components),
             ^
/home/makish/github/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1383:13: note: suggested alternative:
In file included from /home/makish/github/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1:0:
/usr/local/include/deal.II/base/function.h:510:9: note:   ‘dealii::Functions::ZeroFunction’
   class ZeroFunction : public ConstantFunction<dim, RangeNumberType>
         ^
/home/makish/github/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1390:13: error: ‘ZeroFunction’ was not declared in this scope
             ZeroFunction<dim>(n_components),
             ^
/home/makish/github/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1390:13: note: suggested alternative:
In file included from /home/makish/github/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1:0:
/usr/local/include/deal.II/base/function.h:510:9: note:   ‘dealii::Functions::ZeroFunction’
   class ZeroFunction : public ConstantFunction<dim, RangeNumberType>
         ^
/home/makish/github/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc: In instantiation of ‘void Nonlinear_Elasticity::Solid<dim, NumberType>::solve_nonlinear_timestep(dealii::BlockVector<double>&) [with int dim = 2; NumberType = double]’:
/home/makish/github/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:395:33:   required from ‘void Nonlinear_Elasticity::Solid<dim, NumberType>::run() [with int dim = 2; NumberType = double]’
/home/makish/github/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:1522:17:   required from here
/home/makish/github/dealii-adapter/nonlinear_elasticity/nonlinear_elasticity.cc:715:59: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
                error_residual_norm.u <= parameters.tol_f) ||
                                                           ^
CMakeFiles/nonlinear_elasticity.dir/build.make:62: recipe for target 'CMakeFiles/nonlinear_elasticity.dir/nonlinear_elasticity.cc.o' failed
make[2]: *** [CMakeFiles/nonlinear_elasticity.dir/nonlinear_elasticity.cc.o] Error 1
CMakeFiles/Makefile2:264: recipe for target 'CMakeFiles/nonlinear_elasticity.dir/all' failed
make[1]: *** [CMakeFiles/nonlinear_elasticity.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

I am using deal.II 9.2 and GCC 5.5.0.

I will happily close this if it is only on my side and my ancient compiler.

@davidscn
Copy link
Member

This is probably a compiler version problem. I cannot reproduce it with my system gcc (7.5.0).
Officially, deal.II requires gcc 4.9. I need to check this.

@precice-bot
Copy link

This issue has been mentioned on preCICE Forum on Discourse. There might be relevant details there:

https://precice.discourse.group/t/openfoam-openfoam-fsi-coupling/150/37

davidscn added a commit that referenced this issue Jul 3, 2020
davidscn added a commit that referenced this issue Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants