Skip to content

Commit

Permalink
Merge pull request #20 from lwJi/test_newradx
Browse files Browse the repository at this point in the history
TestNewRadX: Separate TestNewRadX from NewRadX
  • Loading branch information
lwJi authored Nov 2, 2023
2 parents 7fc824f + 3f952c3 commit 225df74
Show file tree
Hide file tree
Showing 64 changed files with 1,584 additions and 1,212 deletions.
1 change: 1 addition & 0 deletions Docs/thornlist/spacetimex.th
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ SpacetimeX/AHFinderX
SpacetimeX/BrillLindquist
SpacetimeX/Cowling
SpacetimeX/NewRadX
SpacetimeX/TestNewRadX
SpacetimeX/Punctures
SpacetimeX/PunctureTracker
SpacetimeX/SphericalHarmonics
Expand Down
2 changes: 1 addition & 1 deletion NewRadX/configuration.ccl
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Configuration definition for thorn NewRadX

REQUIRES GSL Loop
REQUIRES Loop
24 changes: 2 additions & 22 deletions NewRadX/interface.ccl
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,8 @@

IMPLEMENTS: NewRadX

USES INCLUDE HEADER: loop.hxx
USES INCLUDE HEADER: loop_device.hxx

INCLUDE HEADER: newradx.hxx in newradx.hxx

INHERITS: CarpetX

# Scalar field grid functions for the unit test
CCTK_REAL state TYPE=gf CENTERING={VVV} TAGS='rhs="rhs"'
{
uu
vv
} "Scalar wave state vector: scalar field and its time derivative"

CCTK_REAL rhs TYPE=gf CENTERING={VVV} TAGS='checkpoint="no"'
{
uu_rhs
vv_rhs
} "RHS of scalar wave state vector"
USES INCLUDE HEADER: loop_device.hxx

CCTK_REAL error TYPE=gf CENTERING={VVV} TAGS='checkpoint="no"'
{
uu_err
vv_err
} "Error in scalar wave state vector"
INCLUDE HEADER: newradx.hxx in newradx.hxx
51 changes: 0 additions & 51 deletions NewRadX/param.ccl
Original file line number Diff line number Diff line change
@@ -1,52 +1 @@
# Parameter definitions for thorn NewRadX
#
# To use radiative boundary conditions in another thorn, the parameters here are not relevant.
# These parameters are only used in the unit test for NewRadX, which applies NewRadX in the evolution of a test scalar field
BOOLEAN run_test "Run scalar field evolution test"
{
} "no"

BOOLEAN test_use_newradx "Use radiative boundary conditions for scalar field"
{
} "yes"

BOOLEAN test_add_dissipation "Add Kreiss-Oliger dissipation to scalar field RHS"
{
} "yes"

CCTK_REAL eps_dissipation "Coefficient for Kreiss-Oliger dissipation"
{
0.0:1.0 :: ""
} 0.15

CCTK_REAL n_falloff "Exponent of the falloff term r^(-n_falloff) in the scalar field potential"
{
0.0:* :: ""
} 2.0


# Parameters scalar field test initial data
CCTK_REAL gaussian_a0 "Scalar field initial Gaussian amplitude"
{
*:* :: ""
} 1.0

CCTK_REAL gaussian_w0 "Scalar field initial Gaussian profile width"
{
0.0:* :: ""
} 1.0

CCTK_REAL gaussian_x0 "Scalar field initial Gaussian profile center"
{
*:* :: ""
} 0.0

CCTK_REAL gaussian_y0 "Scalar field initial Gaussian profile center"
{
*:* :: ""
} 0.0

CCTK_REAL gaussian_z0 "Scalar field initial Gaussian profile center"
{
*:* :: ""
} 0.0
41 changes: 0 additions & 41 deletions NewRadX/schedule.ccl
Original file line number Diff line number Diff line change
@@ -1,42 +1 @@
# Schedule definitions for thorn NewRadX

if (run_test) {
STORAGE: state

SCHEDULE NewRadX_Init AT initial
{
LANG: C
WRITES: state(interior)
SYNC: state
} "Initialize scalar wave state"

SCHEDULE NewRadX_EstimateError AT postinitial
{
LANG: C
READS: state(everywhere)
WRITES: CarpetX::regrid_error(interior)
} "Estimate error for regridding"

SCHEDULE NewRadX_EstimateError AT poststep
{
LANG: C
READS: state(everywhere)
WRITES: CarpetX::regrid_error(interior)
} "Estimate error for regridding"

SCHEDULE NewRadX_RHS IN ODESolvers_RHS
{
LANG: C
READS: state(everywhere)
WRITES: rhs(interior)
SYNC: rhs
} "Calculate scalar wave RHS"

SCHEDULE NewRadX_CompareSolution IN ODESolvers_PostStep
{
LANG: C
READS: state(interior)
WRITES: error(interior)
SYNC: error
} "Calculate error between numerical and analytic solutions"
}
3 changes: 1 addition & 2 deletions NewRadX/src/make.code.defn
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Main make.code.defn file for thorn NewRadX

# Source files in this directory
SRCS = newradx.cxx \
test_newradx.cxx
SRCS = newradx.cxx

# Subdirectories containing source files
SUBDIRS =
182 changes: 0 additions & 182 deletions NewRadX/src/test_newradx.cxx

This file was deleted.

38 changes: 0 additions & 38 deletions NewRadX/test/scalarwave_newradx/newradx-error.it000060.x.tsv

This file was deleted.

Loading

0 comments on commit 225df74

Please sign in to comment.