Open einola opened 1 month ago
BBM still doesn't work, despite the hotfix.
There was a compile warning in develop before the hotfix; maybe this can help:
====================[ Build | nextsim | Debug ]=================================
/Applications/CLion.app/Contents/bin/cmake/mac/aarch64/bin/cmake --build /Users/einola/CLionProjects/nextsimdg/cmake-build-debug --target nextsim -j 6
[3/7] Building CXX object CMakeFiles/nextsimlib.dir/core/src/modules/DynamicsModule/module.cpp.o
In file included from /Users/einola/CLionProjects/nextsimdg/core/src/modules/DynamicsModule/module.cpp:12:
In file included from /Users/einola/CLionProjects/nextsimdg/core/src/modules/DynamicsModule/include/FreeDriftDynamics.hpp:11:
/Users/einola/CLionProjects/nextsimdg/dynamics/src/include/FreeDriftDynamicsKernel.hpp:39:70: warning: base class 'Nextsim::CGDynamicsKernel<6>' is uninitialized when used here to access 'Nextsim::CGDynamicsKernel<6>::u' [-Wuninitialized]
39 | sin(radians * paramsIn.ocean_turning_angle), paramsIn, u, v)
| ^
/Users/einola/CLionProjects/nextsimdg/core/src/modules/DynamicsModule/include/FreeDriftDynamics.hpp:30:11: note: in instantiation of member function 'Nextsim::FreeDriftDynamicsKernel<6>::FreeDriftDynamicsKernel' requested here
30 | , kernel(params)
| ^
In file included from /Users/einola/CLionProjects/nextsimdg/core/src/modules/DynamicsModule/module.cpp:12:
In file included from /Users/einola/CLionProjects/nextsimdg/core/src/modules/DynamicsModule/include/FreeDriftDynamics.hpp:11:
/Users/einola/CLionProjects/nextsimdg/dynamics/src/include/FreeDriftDynamicsKernel.hpp:39:73: warning: base class 'Nextsim::CGDynamicsKernel<6>' is uninitialized when used here to access 'Nextsim::CGDynamicsKernel<6>::v' [-Wuninitialized]
39 | sin(radians * paramsIn.ocean_turning_angle), paramsIn, u, v)
| ^
2 warnings generated.
[4/7] Building CXX object CMakeFiles/nextsimlib.dir/core/src/modules/DynamicsModule/MEVPDynamics.cpp.o
In file included from /Users/einola/CLionProjects/nextsimdg/core/src/modules/DynamicsModule/MEVPDynamics.cpp:10:
In file included from /Users/einola/CLionProjects/nextsimdg/core/src/modules/DynamicsModule/include/MEVPDynamics.hpp:15:
In file included from /Users/einola/CLionProjects/nextsimdg/dynamics/src/include/MEVPDynamicsKernel.hpp:12:
/Users/einola/CLionProjects/nextsimdg/dynamics/src/include/VPCGDynamicsKernel.hpp:58:59: warning: base class 'Nextsim::CGDynamicsKernel<6>' is uninitialized when used here to access 'Nextsim::CGDynamicsKernel<6>::u' [-Wuninitialized]
58 | : CGDynamicsKernel<DGadvection>(1., 0., paramsIn, u, v)
| ^
/Users/einola/CLionProjects/nextsimdg/dynamics/src/include/MEVPDynamicsKernel.hpp:23:11: note: in instantiation of member function 'Nextsim::VPCGDynamicsKernel<6>::VPCGDynamicsKernel' requested here
23 | : VPCGDynamicsKernel<DGadvection>(MEVPStressStep, paramsIn)
| ^
/Users/einola/CLionProjects/nextsimdg/core/src/modules/DynamicsModule/MEVPDynamics.cpp:31:7: note: in instantiation of member function 'Nextsim::MEVPDynamicsKernel<6>::MEVPDynamicsKernel' requested here
31 | , kernel(params)
| ^
In file included from /Users/einola/CLionProjects/nextsimdg/core/src/modules/DynamicsModule/MEVPDynamics.cpp:10:
In file included from /Users/einola/CLionProjects/nextsimdg/core/src/modules/DynamicsModule/include/MEVPDynamics.hpp:15:
In file included from /Users/einola/CLionProjects/nextsimdg/dynamics/src/include/MEVPDynamicsKernel.hpp:12:
/Users/einola/CLionProjects/nextsimdg/dynamics/src/include/VPCGDynamicsKernel.hpp:58:62: warning: base class 'Nextsim::CGDynamicsKernel<6>' is uninitialized when used here to access 'Nextsim::CGDynamicsKernel<6>::v' [-Wuninitialized]
58 | : CGDynamicsKernel<DGadvection>(1., 0., paramsIn, u, v)
| ^
2 warnings generated.
[7/7] Linking CXX executable nextsim
Build finished
I get the same warning in my branch where BBM definitely does work.
Add yes, we need to clean up those warnings.
I've been trying to figure this out, but without any luck. It does not destroy all the ice if I turn off the advection, but that's as far as I've gotten.
Oh! Yes, I still need to debug the advection. That's why PR #668 is still a draft.
The rheology parameters in
param
all have the value 0 (or 0.) now.I check this by putting an
assert(params.P0 > 0.)
somewhere inBBMStressUpdateStep.hpp
(e.g. line 90).Doing a
git bisect
reveals thatI haven't investigated this further.