Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
8e2361a
tap.sh: Update after rebasing onto main
valeriabarra Nov 9, 2020
5772553
Initial development of SWE solver
valeriabarra Apr 29, 2020
b3a0691
SWE: support for PETSc-3.14 DMPlexGetClosureIndices and DMPlexRestore…
valeriabarra May 15, 2020
09a517b
Add copyright statement, improve summary print and other small edits
valeriabarra Jun 3, 2020
9bdada1
Update tap.sh after rebasing with master
valeriabarra Jun 30, 2020
1fb5d86
Add FormJacobian function
valeriabarra Jun 30, 2020
05378a0
Put H0 as a global variable and compute hs as part of qdata
valeriabarra Jul 1, 2020
fbd6f73
Add documentation
valeriabarra Jul 2, 2020
48f7571
SWE: Add advection test case and skeleton for geostrophic test
valeriabarra Jul 7, 2020
d909027
Makefile: fix clean target recursive rm
valeriabarra Jul 7, 2020
b9a6181
Debugging after changing ncompq
valeriabarra Jul 8, 2020
89caa26
WIP: Jacobian for advection test case
valeriabarra Jul 14, 2020
b6545df
SWE: Assign DM label 'panel' for different faces of initial cube
valeriabarra Jul 16, 2020
ca8aa06
SWE: Add FindPanelEdgeNodes() function to determine which nodes are o…
valeriabarra Jul 17, 2020
d1c4b45
Update comment in area and bpssphere setups
valeriabarra Jul 17, 2020
d6a97a4
SWE: Define coordinate transformations for points expressed with loca…
valeriabarra Jul 21, 2020
b7ae1a0
Add TESTARGS and update sample runs
valeriabarra Jul 21, 2020
7b8a94a
SWE: Change panel ordering, following papers convention
valeriabarra Jul 28, 2020
e0f578e
SWE: Fix bit manipulation algorithm in parallel
valeriabarra Jul 28, 2020
29de1ea
SWE: Update DMPlexCreateSphereMesh() call after change in PETSc's API…
valeriabarra Aug 4, 2020
f205e85
Bpssphere: improve comment
valeriabarra Aug 14, 2020
578b94b
SWE: WIP Improve comment and change in geom factors QFunction
valeriabarra Aug 14, 2020
5cf62be
SWE: Transform 3D global coords to 2D local panel coords and update Q…
valeriabarra Aug 14, 2020
a7d986f
SWE: WIP geometric factors local to panel coord systems
valeriabarra Aug 17, 2020
9d1d2ea
SWE: Put back geometric factors as they were
valeriabarra Aug 17, 2020
eeb1397
WIP SWE: pass sparse matrix to user context to be used in wrapper fun…
valeriabarra Aug 19, 2020
a249dd2
SWE: Inside Setup QFunction make sure to project coordinate field ont…
valeriabarra Aug 19, 2020
ac2ba95
examples/fluids: fix usage bugs
jedbrown Sep 3, 2020
dbc55b5
SWE: Fix set context bug after change in the interface
valeriabarra Sep 4, 2020
f402779
SWE WIP: Fix a bug in advection QFunction
valeriabarra Sep 8, 2020
ede2296
SWE: Initial implementation of generic restriction matrix
valeriabarra Sep 23, 2020
e1808a2
examples/fluids: Move setup-boundary.h to navier-stokes
laylagi Mar 9, 2021
568e5c5
SWE: fixed the double prototyping
laylagi Mar 9, 2021
af0adaf
SWE: style
laylagi Mar 9, 2021
af734c2
SWE: fix the weak form in the explicit scheme
laylagi Mar 15, 2021
3c01fc9
SWE: more comments and update the docs
laylagi Mar 16, 2021
da12e01
SWE: some comments on the div operations
laylagi Mar 17, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
SWE: Update DMPlexCreateSphereMesh() call after change in PETSc's API…
… and add compatibility macro
  • Loading branch information
valeriabarra authored and laylagi committed Mar 21, 2021
commit 29de1ea6d7b116d9a2a754f3c7c7792a2f08dc2a
20 changes: 10 additions & 10 deletions examples/fluids/shallow-water/qfunctions/geostrophic.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ CEED_QFUNCTION(ICsSW)(void *ctx, CeedInt Q,
const CeedScalar x[] = {X[0][i], X[1][i], X[2][i]};
CeedScalar q[5];

Exact_SW(2, 0., x, 5, q, ctx);
Exact_SW(2, 0., x, 3, q, ctx);

for (CeedInt j=0; j<5; j++)
for (CeedInt j=0; j<3; j++)
q0[j][i] = q[j];
} // End of Quadrature Point Loop

Expand Down Expand Up @@ -153,15 +153,15 @@ CEED_QFUNCTION(SWExplicit)(void *ctx, CeedInt Q, const CeedScalar *const *in,
// The Physics
// Explicit spatial terms of G_1(t,q):
// Explicit terms multiplying v
// - (omega + f) * khat curl u - grad(|u|^2/2)
// - (omega + f) * khat curl u - grad(|u|^2/2) // TODO: needs fix with weak form
v[0][i] = - wdetJ*(u[0]*du[0][0] + u[1]*du[0][1] + f*u[1]);
// No explicit terms multiplying dv
dv[0][0][i] = 0;
dv[1][0][i] = 0;

// Explicit spatial terms of G_2(t,q):
// Explicit terms multiplying v
// - (omega + f) * khat curl u - grad(|u|^2/2)
// - (omega + f) * khat curl u - grad(|u|^2/2) // TODO: needs fix with weak form
v[1][i] = - wdetJ*(u[0]*du[1][0] + u[1]*du[1][1] - f*u[0]);
// No explicit terms multiplying dv
dv[0][1][i] = 0;
Expand Down Expand Up @@ -210,9 +210,9 @@ CEED_QFUNCTION(SWImplicit)(void *ctx, CeedInt Q, const CeedScalar *const *in,
(*dv)[3][CEED_Q_VLA] = (CeedScalar(*)[3][CEED_Q_VLA])out[1];
// *INDENT-ON*
// Context
const PhysicsContext context = (PhysicsContext)ctx;
const CeedScalar g = context->g;
const CeedScalar H0 = context->H0;
const PhysicsContext context = (PhysicsContext)ctx;
const CeedScalar g = context->g;
const CeedScalar H0 = context->H0;

CeedPragmaSIMD
// Quadrature Point Loop
Expand Down Expand Up @@ -299,9 +299,9 @@ CEED_QFUNCTION(SWJacobian)(void *ctx, CeedInt Q, const CeedScalar *const *in,
CeedScalar (*deltadvdX)[3][CEED_Q_VLA] = (CeedScalar(*)[3][CEED_Q_VLA])out[0];
// *INDENT-ON*
// Context
const PhysicsContext context = (PhysicsContext)ctx;
const CeedScalar g = context->g;
const CeedScalar H0 = context->H0;
const PhysicsContext context = (PhysicsContext)ctx;
const CeedScalar g = context->g;
const CeedScalar H0 = context->H0;

CeedPragmaSIMD
// Quadrature Point Loop
Expand Down
3 changes: 2 additions & 1 deletion examples/fluids/shallow-water/shallowwater.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ int main(int argc, char **argv) {
} else {
// Create the mesh as a 0-refined sphere. This will create a cubic surface, not a box.
PetscBool simplex = PETSC_FALSE;
ierr = DMPlexCreateSphereMesh(PETSC_COMM_WORLD, topodim, simplex, &dm);
ierr = DMPlexCreateSphereMesh(PETSC_COMM_WORLD, topodim, simplex,
phys_ctx.R, &dm);
CHKERRQ(ierr);
// Set the object name
ierr = PetscObjectSetName((PetscObject)dm, "Sphere"); CHKERRQ(ierr);
Expand Down
4 changes: 4 additions & 0 deletions examples/fluids/shallow-water/src/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
# define DMPlexRestoreClosureIndices(a,b,c,d,e,f,g,h,i) DMPlexRestoreClosureIndices(a,b,c,d,f,g,i)
#endif

#if PETSC_VERSION_LT(3,14,0)
# define DMPlexCreateSphereMesh(a,b,c,d,e) DMPlexCreateSphereMesh(a,b,c,e)
#endif

problemData problemOptions[] = {
[SWE_ADVECTION] = {
.topodim = 2,
Expand Down