TestDerivs

Liwei Ji <ljsma@rit.edu>

July 27 2023

Abstract

1 Introduction

2 Physical System

3 Numerical Implementation

4 Using This Thorn

4.1 Obtaining This Thorn

4.2 Basic Usage

4.3 Special Behaviour

4.4 Interaction With Other Thorns

4.5 Examples

4.6 Support and Feedback

5 History

5.1 Thorn Source Code

5.2 Thorn Documentation

5.3 Acknowledgements

References

6 Parameters




deriv_order
Scope: private INT



Description: Order of spatial finite differencing



Range Default: 4
2
Second order finite difference
4
Fourth order finite difference
6
Sixth order finite difference
8
Eighth order finite difference






kxx
Scope: private REAL



Description: par for polynomial



Range Default: 0.0
*:*






kxy
Scope: private REAL



Description: par for polynomial



Range Default: 0.0
*:*






kyz
Scope: private REAL



Description: par for polynomial



Range Default: 0.0
*:*






refined_radius
Scope: private REAL



Description: size of the refined region at the center



Range Default: 0.25
(0:*
any positive size



7 Interfaces

General

Implements:

testderivs

Inherits:

carpetxregrid

Grid Variables

7.0.1 PRIVATE GROUPS





  Group Names     Variable Names   Details    




chi chi centering centering={0 0 0}
compact 0
description Test grid function
dimensions 3
distribution DEFAULT
group type GF
timelevels 1
variable type REAL




dchi centering centering={0 0 0}
dxchi compact 0
dychi description 1st derivs of test grid function
dzchi dimensions 3
distribution DEFAULT
group type GF
tags checkpoint=”no”
timelevels 1
variable type REAL




ddchi centering centering={0 0 0}
dxxchi compact 0
dxychi description 2nd derivs of test grid function
dxzchi dimensions 3
dyychi distribution DEFAULT
dyzchi group type GF
dzzchi tags checkpoint=”no”
timelevels 1
variable type REAL




chi_diss chi_diss centering centering={0 0 0}
compact 0
description dissipation term
dimensions 3
distribution DEFAULT
group type GF
tags checkpoint=”no”
timelevels 1
variable type REAL




beta centering centering={0 0 0}
betax compact 0
betay description velocity function used for calculating upwind term
betaz dimensions 3
distribution DEFAULT
group type GF
timelevels 1
variable type REAL




chi_upwind chi_upwind centering centering={0 0 0}
compact 0
description upwind term
dimensions 3
distribution DEFAULT
group type GF
tags checkpoint=”no”
timelevels 1
variable type REAL








  Group Names     Variable Names   Details    




dchi_error centering centering={0 0 0}
dxchi_error compact 0
dychi_error description error of 1st derivs of test grid function
dzchi_error dimensions 3
distribution DEFAULT
group type GF
tags checkpoint=”no”
timelevels 1
variable type REAL




ddchi_error centering centering={0 0 0}
dxxchi_error compact 0
dxychi_error description error of 2nd derivs of test grid function
dxzchi_error dimensions 3
dyychi_error distribution DEFAULT
dyzchi_error group type GF
dzzchi_error tags checkpoint=”no”
timelevels 1
variable type REAL




chi_diss_error chi_diss_error centering centering={0 0 0}
compact 0
description error in dissipation term
dimensions 3
distribution DEFAULT
group type GF
tags checkpoint=”no”
timelevels 1
variable type REAL




chi_upwind_error chi_upwind_error centering centering={0 0 0}
compact 0
description error in upwind term
dimensions 3
distribution DEFAULT
group type GF
tags checkpoint=”no”
timelevels 1
variable type REAL




Uses header:

defs.hxx

loop_device.hxx

simd.hxx

vect.hxx

derivs.hxx

8 Schedule

This section lists all the variables which are assigned storage by thorn CarpetX/TestDerivs. Storage can either last for the duration of the run (Always means that if this thorn is activated storage will be assigned, Conditional means that if this thorn is activated storage will be assigned for the duration of the run if some condition is met), or can be turned on for the duration of a schedule function.

Storage

 

Always:  
chi  
dchi  
ddchi  
   

Scheduled Functions

CCTK_POSTINITIAL

  testderivs_seterror

  set up test grid

 

  Language: c
  Type: function
  Writes: carpetxregrid::regrid_error(interior)

CCTK_INITIAL

  testderivs_set

  set up test data

 

  Language: c
  Sync: chi
    beta
  Type: function
  Writes: chi(interior)
    beta(interior)

CCTK_POSTREGRID

  testderivs_sync

  synchronize

 

  Language: c
  Options: global
  Sync: chi
  Type: function

CCTK_POSTSTEP

  testderivs_calcderivs

  calculate derivs

 

  Language: c
  Reads: chi(everywhere)
    beta(interior)
  Sync: dchi
    ddchi
    chi_diss
    chi_upwind
  Type: function
  Writes: dchi(interior)
    ddchi(interior)
    chi_diss(interior)
    chi_upwind(interior)

CCTK_POSTSTEP

  testderivs_calcerror

  calculate derivs error

 

  After: testderivs_calcderivs
  Language: c
  Reads: dchi(interior)
    ddchi(interior)
    chi_diss(interior)
    chi_upwind(interior)
  Sync: dchi_error
    ddchi_error
    chi_diss_error
    chi_upwind_error
  Type: function
  Writes: dchi_error(interior)
    ddchi_error(interior)
    chi_diss_error(interior)
    chi_upwind_error(interior)