Problem updating kernels for current MOOSE #23539
-
Hello all, I have a problem regarding the update of my custom kernels to the newest syntax. After updating MOOSE using the standard way from the tutorial, I ran into the problem that parts of the code date back to before 2020, and as I have found the syntax was changed in April 2020 (https://mooseframework.inl.gov/releases/moose/2021-09-15/newsletter/2020_04.html). I have uploaded the kernels in question on my Github (https://github.com/mfitzka/phoenixpublic) under h kernels old/updated and C kernels old/updated. If anyone could take a look at the files (especially CoupledCureTimeDerivative and DCPDnonDgeneralPT since they are my main problem at the moment) it would be very much appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Hello It should be validParams not validParms in your header
Guillaume |
Beta Was this translation helpful? Give feedback.
-
Thank you, I fixed that typo. It is still not working though.
Does this error code during the make file help? |
Beta Was this translation helpful? Give feedback.
-
You need to match the function signature exactly for validParams. The constructor seems to also be an issue though that can be a consequence of a previous error. I can take a closer look tonightPlease refer to another kernel in the framework for an exampleLe 26 févr. 2023 à 09:32, mfitzka ***@***.***> a écrit :
Thank you, I fixed that typo. It is still not working though.
Compiling C++ (in opt mode) /home/fitzka/projects/phoenix/build/unity_src/kernels_Unity.C...
In file included from /home/fitzka/projects/phoenix/build/unity_src/kernels_Unity.C:3:
/home/fitzka/projects/phoenix/src/kernels/CoupledCureTimeDerivative.C:13:5: error: template-id 'validParams<>' for 'InputParameters CoupledCureTimeDerivative::validParams()' does not match any template declaration
13 | CoupledCureTimeDerivative::validParams()
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/fitzka/projects/phoenix/src/kernels/CoupledCureTimeDerivative.C:7,
from /home/fitzka/projects/phoenix/build/unity_src/kernels_Unity.C:3:
/home/fitzka/projects/phoenix/build/header_symlinks/CoupledCureTimeDerivative.h:23:27: note: candidate is: 'static InputParameters CoupledCureTimeDerivative::validParams(const InputParameters&)'
23 | static InputParameters validParams(const InputParameters & parameters);
| ^~~~~~~~~~~
In file included from /home/fitzka/projects/phoenix/build/unity_src/kernels_Unity.C:3:
/home/fitzka/projects/phoenix/src/kernels/CoupledCureTimeDerivative.C:28:5: error: no declaration matches 'CoupledCureTimeDerivative::CoupledCureTimeDerivative(const InputParameters&)'
28 | CoupledCureTimeDerivative::CoupledCureTimeDerivative(const InputParameters ¶meters) :
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/fitzka/projects/phoenix/src/kernels/CoupledCureTimeDerivative.C:7,
from /home/fitzka/projects/phoenix/build/unity_src/kernels_Unity.C:3:
/home/fitzka/projects/phoenix/build/header_symlinks/CoupledCureTimeDerivative.h:20:10: note: candidates are: 'CoupledCureTimeDerivative::CoupledCureTimeDerivative(CoupledCureTimeDerivative&&)'
20 | class CoupledCureTimeDerivative : public Kernel
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/fitzka/projects/phoenix/build/header_symlinks/CoupledCureTimeDerivative.h:20:10: note: 'CoupledCureTimeDerivative::CoupledCureTimeDerivative(const CoupledCureTimeDerivative&)'
/home/fitzka/projects/phoenix/build/header_symlinks/CoupledCureTimeDerivative.h:20:10: note: 'CoupledCureTimeDerivative::CoupledCureTimeDerivative()'
/home/fitzka/projects/phoenix/build/header_symlinks/CoupledCureTimeDerivative.h:20:10: note: 'class CoupledCureTimeDerivative' defined here
In file included from /home/fitzka/projects/moose/framework/build/header_symlinks/MooseObject.h:13,
from /home/fitzka/projects/moose/framework/build/header_symlinks/ResidualObject.h:12,
from /home/fitzka/projects/moose/framework/build/header_symlinks/BoundaryCondition.h:13,
from /home/fitzka/projects/moose/framework/build/header_symlinks/IntegratedBCBase.h:12,
from /home/fitzka/projects/moose/framework/build/header_symlinks/IntegratedBC.h:12,
from /home/fitzka/projects/moose/modules/heat_conduction/build/header_symlinks/ConvectiveFluxFunction.h:12,
from /home/fitzka/projects/phoenix/src/kernels/ConvectiveFluxFunction.C:10,
from /home/fitzka/projects/phoenix/build/unity_src/kernels_Unity.C:2:
/home/fitzka/projects/moose/framework/build/header_symlinks/InputParameters.h: In instantiation of 'InputParameters moose::internal::callValidParams() [with T = CoupledCureTimeDerivative]':
/home/fitzka/projects/moose/framework/build/header_symlinks/Registry.h:166:22: required from 'static char Registry::add(const RegistryEntry&) [with T = CoupledCureTimeDerivative]'
/home/fitzka/projects/phoenix/src/kernels/CoupledCureTimeDerivative.C:9:1: required from here
/home/fitzka/projects/moose/framework/build/header_symlinks/InputParameters.h:1820:24: error: no matching function for call to 'CoupledCureTimeDerivative::validParams()'
1820 | return T::validParams();
| ~~~~~~~~~~~~~~^~
In file included from /home/fitzka/projects/phoenix/src/kernels/CoupledCureTimeDerivative.C:7,
from /home/fitzka/projects/phoenix/build/unity_src/kernels_Unity.C:3:
/home/fitzka/projects/phoenix/build/header_symlinks/CoupledCureTimeDerivative.h:23:27: note: candidate: 'static InputParameters CoupledCureTimeDerivative::validParams(const InputParameters&)'
23 | static InputParameters validParams(const InputParameters & parameters);
| ^~~~~~~~~~~
/home/fitzka/projects/phoenix/build/header_symlinks/CoupledCureTimeDerivative.h:23:27: note: candidate expects 1 argument, 0 provided
In file included from /home/fitzka/mambaforge3/envs/moose/x86_64-conda-linux-gnu/include/c++/10.4.0/x86_64-conda-linux-gnu/bits/c++allocator.h:33,
from /home/fitzka/mambaforge3/envs/moose/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/allocator.h:46,
from /home/fitzka/mambaforge3/envs/moose/x86_64-conda-linux-gnu/include/c++/10.4.0/string:41,
from /home/fitzka/mambaforge3/envs/moose/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/locale_classes.h:40,
from /home/fitzka/mambaforge3/envs/moose/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/ios_base.h:41,
from /home/fitzka/mambaforge3/envs/moose/x86_64-conda-linux-gnu/include/c++/10.4.0/ios:42,
from /home/fitzka/mambaforge3/envs/moose/x86_64-conda-linux-gnu/include/c++/10.4.0/istream:38,
from /home/fitzka/mambaforge3/envs/moose/x86_64-conda-linux-gnu/include/c++/10.4.0/sstream:38,
from /home/fitzka/mambaforge3/envs/moose/x86_64-conda-linux-gnu/include/c++/10.4.0/complex:45,
from /home/fitzka/mambaforge3/envs/moose/libmesh/include/libmesh/libmesh_common.h:46,
from /home/fitzka/mambaforge3/envs/moose/libmesh/include/libmesh/threads.h:24,
from /home/fitzka/projects/moose/framework/build/header_symlinks/HashMap.h:13,
from /home/fitzka/projects/moose/framework/build/header_symlinks/MooseUtils.h:13,
from /home/fitzka/projects/moose/framework/build/header_symlinks/InputParameters.h:13,
from /home/fitzka/projects/moose/framework/build/header_symlinks/MooseObject.h:13,
from /home/fitzka/projects/moose/framework/build/header_symlinks/ResidualObject.h:12,
from /home/fitzka/projects/moose/framework/build/header_symlinks/BoundaryCondition.h:13,
from /home/fitzka/projects/moose/framework/build/header_symlinks/IntegratedBCBase.h:12,
from /home/fitzka/projects/moose/framework/build/header_symlinks/IntegratedBC.h:12,
from /home/fitzka/projects/moose/modules/heat_conduction/build/header_symlinks/ConvectiveFluxFunction.h:12,
from /home/fitzka/projects/phoenix/src/kernels/ConvectiveFluxFunction.C:10,
from /home/fitzka/projects/phoenix/build/unity_src/kernels_Unity.C:2:
/home/fitzka/mambaforge3/envs/moose/x86_64-conda-linux-gnu/include/c++/10.4.0/ext/new_allocator.h: In instantiation of 'void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = CoupledCureTimeDerivative; _Args = {const InputParameters&}; _Tp = CoupledCureTimeDerivative]':
/home/fitzka/mambaforge3/envs/moose/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/alloc_traits.h:512:17: required from 'static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = CoupledCureTimeDerivative; _Args = {const InputParameters&}; _Tp = CoupledCureTimeDerivative; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<CoupledCureTimeDerivative>]'
/home/fitzka/mambaforge3/envs/moose/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/shared_ptr_base.h:551:39: required from 'std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = {const InputParameters&}; _Tp = CoupledCureTimeDerivative; _Alloc = std::allocator<CoupledCureTimeDerivative>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
/home/fitzka/mambaforge3/envs/moose/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/shared_ptr_base.h:682:16: required from 'std::__shared_count<_Lp>::__shared_count(_Tp*&, std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = CoupledCureTimeDerivative; _Alloc = std::allocator<CoupledCureTimeDerivative>; _Args = {const InputParameters&}; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
/home/fitzka/mambaforge3/envs/moose/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/shared_ptr_base.h:1376:71: required from 'std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<CoupledCureTimeDerivative>; _Args = {const InputParameters&}; _Tp = CoupledCureTimeDerivative; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]'
/home/fitzka/mambaforge3/envs/moose/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/shared_ptr.h:408:59: required from 'std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = std::allocator<CoupledCureTimeDerivative>; _Args = {const InputParameters&}; _Tp = CoupledCureTimeDerivative]'
/home/fitzka/mambaforge3/envs/moose/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/shared_ptr.h:861:14: required from 'std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = CoupledCureTimeDerivative; _Alloc = std::allocator<CoupledCureTimeDerivative>; _Args = {const InputParameters&}]'
/home/fitzka/mambaforge3/envs/moose/x86_64-conda-linux-gnu/include/c++/10.4.0/bits/shared_ptr.h:877:39: required from 'std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp = CoupledCureTimeDerivative; _Args = {const InputParameters&}]'
/home/fitzka/projects/moose/framework/build/header_symlinks/Registry.h:234:31: required from 'static std::shared_ptr<_Tp> Registry::build(const InputParameters&) [with T = CoupledCureTimeDerivative; ToType = MooseObject]'
/home/fitzka/projects/moose/framework/build/header_symlinks/Registry.h:165:21: required from 'static char Registry::add(const RegistryEntry&) [with T = CoupledCureTimeDerivative]'
/home/fitzka/projects/phoenix/src/kernels/CoupledCureTimeDerivative.C:9:1: required from here
/home/fitzka/mambaforge3/envs/moose/x86_64-conda-linux-gnu/include/c++/10.4.0/ext/new_allocator.h:156:4: error: no matching function for call to 'CoupledCureTimeDerivative::CoupledCureTimeDerivative(const InputParameters&)'
156 | { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/fitzka/projects/phoenix/src/kernels/CoupledCureTimeDerivative.C:7,
from /home/fitzka/projects/phoenix/build/unity_src/kernels_Unity.C:3:
/home/fitzka/projects/phoenix/build/header_symlinks/CoupledCureTimeDerivative.h:20:10: note: candidate: 'CoupledCureTimeDerivative::CoupledCureTimeDerivative(const CoupledCureTimeDerivative&)'
20 | class CoupledCureTimeDerivative : public Kernel
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/fitzka/projects/phoenix/build/header_symlinks/CoupledCureTimeDerivative.h:20:10: note: no known conversion for argument 1 from 'const InputParameters' to 'const CoupledCureTimeDerivative&'
/home/fitzka/projects/phoenix/build/header_symlinks/CoupledCureTimeDerivative.h:20:10: note: candidate: 'CoupledCureTimeDerivative::CoupledCureTimeDerivative(CoupledCureTimeDerivative&&)'
/home/fitzka/projects/phoenix/build/header_symlinks/CoupledCureTimeDerivative.h:20:10: note: no known conversion for argument 1 from 'const InputParameters' to 'CoupledCureTimeDerivative&&'
make: *** [/home/fitzka/projects/moose/framework/build.mk:145: /home/fitzka/projects/phoenix/build/unity_src/kernels_Unity.x86_64-conda-linux-gnu.opt.lo] Error 1
Does this error code during the make file help?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
In the header You have
It should be:
In the source
It should be:
|
Beta Was this translation helpful? Give feedback.
In the header
You have
It should be:
In the source
You have:
It should be: