Skip to content

Commit

Permalink
TestRKAB: Updated the thorn to use a first order formulation for the …
Browse files Browse the repository at this point in the history
…wave equation. Standing wave data available. Gaussian data pending
  • Loading branch information
lucass-carneiro committed Oct 3, 2024
1 parent 2864d5a commit 84b58ec
Show file tree
Hide file tree
Showing 6 changed files with 152 additions and 243 deletions.
63 changes: 0 additions & 63 deletions TestRKAB/gaussian_single_mesh.par

This file was deleted.

36 changes: 24 additions & 12 deletions TestRKAB/interface.ccl
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,39 @@ USES INCLUDE HEADER: vect.hxx

CCTK_REAL state TYPE=gf TAGS='rhs="rhs" dependents="error"'
{
u
rho
} "Scalar wave state vector"
phi
Pi
Dx
Dy
Dz
} "Scalar wave equation state vector"

CCTK_REAL pre TYPE=gf TAGS='checkpoint="no"'
{
u_pre
rho_pre
} "Scalar wave pre state vector"
phi_pre
Pi_pre
Dx_pre
Dy_pre
Dz_pre
} "Scalar wave equation previous state vector"

CCTK_REAL rhs TYPE=gf TAGS='checkpoint="no"'
{
u_rhs
rho_rhs
} "RHS of scalar wave state vector"
phi_rhs
Pi_rhs
Dx_rhs
Dy_rhs
Dz_rhs
} "RHS of scalar wave equation"

CCTK_REAL error TYPE=gf TAGS='checkpoint="no"'
{
u_err
rho_err
} "Error in scalar wave state vector"
phi_err
Pi_err
Dx_err
Dy_err
Dz_err
} "Error in scalar wave equation evolution"



6 changes: 3 additions & 3 deletions TestRKAB/param.ccl
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ CCTK_REAL amplitude "Initial amplitude"
CCTK_REAL standing_wave_kx "kx for standing wave"
{
*:* :: ""
} 0.5
} 1.0

CCTK_REAL standing_wave_ky "kz for standing wave"
{
*:* :: ""
} 0.5
} 1.0

CCTK_REAL standing_wave_kz "ky for standing wave"
{
*:* :: ""
} 0.5
} 1.0

CCTK_REAL gaussian_width "width of Gaussian"
{
Expand Down
26 changes: 14 additions & 12 deletions TestRKAB/schedule.ccl
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,21 @@

STORAGE: state pre rhs


# Init
SCHEDULE TestRKAB_Initial AT initial
{
LANG: C
WRITES: state(interior)
SYNC: state
} "Initialize scalar wave state"
WRITES: state(interior) pre(interior)
SYNC: state pre
} "Initialize scalar wave state and previous state"

# Step
SCHEDULE TestRKAB_Sync AT postregrid
{
LANG: C
OPTIONS: global
SYNC: state
} "Synchronize"

SCHEDULE TestRKAB_Sync IN ODESolvers_PostStep
{
LANG: C
OPTIONS: global
SYNC: state
} "Synchronize"
} "Synchronize state"

SCHEDULE TestRKAB_RHS IN ODESolvers_RHS
{
Expand All @@ -31,6 +25,14 @@ SCHEDULE TestRKAB_RHS IN ODESolvers_RHS
WRITES: rhs(interior)
} "Calculate scalar wave RHS"

SCHEDULE TestRKAB_Sync IN ODESolvers_PostStep
{
LANG: C
OPTIONS: global
SYNC: state
} "Synchronize state"

# Analysis
SCHEDULE TestRKAB_Error IN ODESolvers_PostStep AFTER TestRKAB_Sync
{
LANG: C
Expand Down
Loading

0 comments on commit 84b58ec

Please sign in to comment.