From 050b365963a0bfd54e73d48f12c80fd89978fc08 Mon Sep 17 00:00:00 2001 From: valeriabarra Date: Tue, 18 Aug 2020 22:02:48 -0600 Subject: [PATCH] SWE: Inside Setup QFunction make sure to project coordinate field onto unit sphere --- .../shallow-water/qfunctions/setup_geo.h | 18 ++++++++++++++---- examples/fluids/shallow-water/shallowwater.c | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/examples/fluids/shallow-water/qfunctions/setup_geo.h b/examples/fluids/shallow-water/qfunctions/setup_geo.h index 144791987e..708515497a 100644 --- a/examples/fluids/shallow-water/qfunctions/setup_geo.h +++ b/examples/fluids/shallow-water/qfunctions/setup_geo.h @@ -20,6 +20,8 @@ #ifndef setupgeo_h #define setupgeo_h +#include "../sw_headers.h" + #ifndef __CUDACC__ # include #endif @@ -67,15 +69,23 @@ CEED_QFUNCTION(SetupGeo)(void *ctx, CeedInt Q, // Outputs CeedScalar (*qdata)[CEED_Q_VLA] = (CeedScalar(*)[CEED_Q_VLA])out[0]; // *INDENT-ON* + // Context + const PhysicsContext context = (PhysicsContext)ctx; + const CeedScalar R = context->R; CeedPragmaSIMD // Quadrature Point Loop for (CeedInt i=0; i