Suppressed unused variable and function warnings in model_rk3.cc
This commit is contained in:
@@ -697,19 +697,18 @@ entropy(const ModelScalarData& ss, const ModelVectorData& uu, const ModelScalarD
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static inline bool
|
||||||
is_valid(const ModelScalar a)
|
is_valid(const ModelScalar a)
|
||||||
{
|
{
|
||||||
return !isnan(a) && !isinf(a);
|
return !isnan(a) && !isinf(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static inline bool
|
||||||
is_valid(const ModelVector& a)
|
is_valid(const ModelVector& a)
|
||||||
{
|
{
|
||||||
return is_valid(a.x) && is_valid(a.y) && is_valid(a.z);
|
return is_valid(a.x) && is_valid(a.y) && is_valid(a.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
//FORCING NOT SUPPORTED FOR AUTOTEST
|
//FORCING NOT SUPPORTED FOR AUTOTEST
|
||||||
|
|
||||||
@@ -849,12 +848,13 @@ solve_beta_step(const int step_number, const ModelScalar dt, const int i, const
|
|||||||
for (int w = 0; w < NUM_VTXBUF_HANDLES; ++w)
|
for (int w = 0; w < NUM_VTXBUF_HANDLES; ++w)
|
||||||
out->vertex_buffer[w][idx] += beta[step_number] * in.vertex_buffer[w][idx];
|
out->vertex_buffer[w][idx] += beta[step_number] * in.vertex_buffer[w][idx];
|
||||||
|
|
||||||
|
(void)dt; // Suppress unused variable warning if forcing not used
|
||||||
#if LFORCING
|
#if LFORCING
|
||||||
if (step_number == 2) {
|
if (step_number == 2) {
|
||||||
ModelVector force = forcing((int3){i, j, k}, dt);
|
ModelVector force = forcing((int3){i, j, k}, dt);
|
||||||
out->vertex_buffer[VTXBUF_UUX][idx] += force.x ;
|
out->vertex_buffer[VTXBUF_UUX][idx] += force.x;
|
||||||
out->vertex_buffer[VTXBUF_UUY][idx] += force.y ;
|
out->vertex_buffer[VTXBUF_UUY][idx] += force.y;
|
||||||
out->vertex_buffer[VTXBUF_UUZ][idx] += force.z ;
|
out->vertex_buffer[VTXBUF_UUZ][idx] += force.z;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user