Skip to content

Commit 1d8f520

Browse files
committed
Add empty SolverSpecificNumerics to generic ViscRes_impl.
Alternatively one could go pure virtual as Pedro mentions, but I guess this is fine for now.
1 parent 3e86076 commit 1d8f520

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

SU2_CFD/include/solvers/CScalarSolver.hpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,16 @@ class CScalarSolver : public CSolver {
147147
* \note Calls a generic implementation after defining a SolverSpecificNumerics object.
148148
*/
149149
inline virtual void Viscous_Residual(unsigned long iEdge, CGeometry* geometry, CSolver** solver_container,
150-
CNumerics* numerics, CConfig* config) {}
150+
CNumerics* numerics, CConfig* config) {
151+
152+
/*--- Define an empty object for solver specific numerics contribution. In case there are none, this default
153+
*--- implementation will be called ---*/
154+
auto SolverSpecificNumerics = [&](unsigned long iPoint, unsigned long jPoint) { };
155+
156+
/*--- Now instantiate the generic implementation with the functor above. ---*/
157+
158+
Viscous_Residual_impl(SolverSpecificNumerics, iEdge, geometry, solver_container, numerics, config);
159+
}
151160
using CSolver::Viscous_Residual; /*--- Silence warning ---*/
152161

153162
/*!

0 commit comments

Comments
 (0)