xx TestMoL

TestMoL

Roland Haas <rhaas@caltech.edu>

February 12 2014

Abstract

This thorn provides tests (partially correctness tests) for MoL. It integrates a known function in time choosing for each ODE method a polynomial in time that can be exactly integrated by the method.

1 Introduction

The method of lines thorn (MoL) provides time integration facilities in Cactus. It basically is a wrapper for ODE integrators. As such it can be tested by comparing its results against known analytic solutions.

2 Physical System

For grid functions we integrate where is chosen such that a given ODE method can integrate the polynomial exactly, eg. for the classical Runge-Kutta method. For multi-rate ODE methods, the slow sector integrates where is usually smaller than , eg. for the RK4-RK2 scheme. Finally grid arrays integrate where is the same as for (fast) grid functions.

3 Numerical Implementation

All numerical methods are provided by MoL. We construct the numerical solution be evaluating the RHS on the full domain, no ghost or boundary zones are required. We provide the numerical solution in evolvedxgf, evolvedslowxgf, evolvedxga for the grid function, slow sector grid function and grid array respectively. For each type we provide the analytical solution in analyticxgf, analyticslowxgf, analyticxga. We provide the difference between the two in diffxgf, diffslowxgf, diffxga.

Parameter files for the tests are generated using a perl script ODEs.pl in the test directory. Its use is briefly explained in a comment near the top of the file.

4 Using This Thorn

This thorn provides no functionality other than the tests.

4.1 Obtaining This Thorn

This thorn is part of the CactusTest arrangement and can be checked out from the same source as Cactus.

4.2 Interaction With Other Thorns This thorn requires MoL.

5 Parameters

11 evolvexgridxarray 10 Scope: private01  BOOLEAN

11 Description: register an evolved grid array with MoL

11                  10              01  Default: yes

11

11 evolvexgridxfunction10 Scope: private01  BOOLEAN

11 Description: register an evolved grid function with MoL

11                  10              01  Default: yes

11

11 rhsexpression  10 Scope: private01  KEYWORD

11 Description: expression to use for the right-hand-side of the ODE

11 Range 10 01 Default: 1
11 1  10 unit rhs
11 t  10 linear in time rhs
11 t**2  10 quadratic in time rhs
11 t**3  10 cubic in time rhs
11 t**4  10 quartic in time rhs
11 t**5  10 quintic in time rhs
11 t**6  10 sixth order in time rhs
11 t**7  10 seventh order in time rhs
11 t**8  10 eight order in time rhs
11 t**9  10 ninth order in time rhs
11 exp(t)  10 exponential in time rhs

11

11 rhsslowexpression 10 Scope: private01  KEYWORD

11 Description: expression to use for the right-hand-side of the slow ODE

11 Range 10 01 Default: 1
11 1  10 unit rhs
11 t  10 linear in time rhs
11 t**2  10 quadratic in time rhs
11 t**3  10 cubic in time rhs
11 t**4  10 quartic in time rhs
11 t**5  10 quintic in time rhs
11 t**6  10 sixth order in time rhs
11 t**7  10 seventh order in time rhs
11 t**8  10 eight order in time rhs
11 t**9  10 ninth order in time rhs
11 exp(t)  10 exponential in time rhs

6 Interfaces

General Implements: testmol

Inherits: methodoflines

Grid Variables

6.0.1 PRIVATE GROUPS

11 x Group Names x 10 x Variable Names x01 Details x 11 x
11 evolvedxgf 10 evolvedxgf 01 compact 11 0
11                    10                    01 description 11 an evolved grid function
11                    10                    01 dimensions 11 3
11                    10                    01 distribution 11 DEFAULT
11                    10                    01 group type 11 GF
11                    10                    01 timelevels 11 3
11                    10                    01 variable type 11 REAL
11 rhsxgf 10 rhsxgf 01 compact 11 0
11                    10                    01 description 11 the rhs for the evolved grid function
11                    10                    01 dimensions 11 3
11                    10                    01 distribution 11 DEFAULT
11                    10                    01 group type 11 GF
11                    10                    01 timelevels 11 1
11                    10                    01 variable type 11 REAL
11 evolvedslowxgf 10 evolvedslowxgf 01 compact 11 0
11                    10                    01 description 11 a slow evolved grid function
11                    10                    01 dimensions 11 3
11                    10                    01 distribution 11 DEFAULT
11                    10                    01 group type 11 GF
11                    10                    01 timelevels 11 3
11                    10                    01 variable type 11 REAL
11 rhsslowxgf 10 rhsslowxgf 01 compact 11 0
11                    10                    01 description 11 the rhs for the slow evolved grid function
11                    10                    01 dimensions 11 3
11                    10                    01 distribution 11 DEFAULT
11                    10                    01 group type 11 GF
11                    10                    01 timelevels 11 1
11                    10                    01 variable type 11 REAL
11 constrainedxgf 10 constrainedxgf 01 compact 11 0
11                    10                    01 description 11 a constrained grid function
11                    10                    01 dimensions 11 3
11                    10                    01 distribution 11 DEFAULT
11                    10                    01 group type 11 GF
11                    10                    01 timelevels 11 3
11                    10                    01 variable type 11 REAL
11 sandrxgf 10 sandrxgf 01 compact 11 0
11                    10                    01 description 11 a save-and-restore grid function
11                    10                    01 dimensions 11 3
11                    10                    01 distribution 11 DEFAULT
11                    10                    01 group type 11 GF
11                    10                    01 timelevels 11 3
11                    10                    01 variable type 11 REAL

11 x Group Names x 10 x Variable Names x01 Details x 11 x
11 diffxgf 10 diffxgf 01 compact 11 0
11                    10                    01 description 11 difference to analytic solution in grid function
11                    10                    01 dimensions 11 3
11                    10                    01 distribution 11 DEFAULT
11                    10                    01 group type 11 GF
11                    10                    01 timelevels 11 1
11                    10                    01 variable type 11 REAL
11 analyticxgf 10 analyticxgf 01 compact 11 0
11                    10                    01 description 11 analytic solution in grid function
11                    10                    01 dimensions 11 3
11                    10                    01 distribution 11 DEFAULT
11                    10                    01 group type 11 GF
11                    10                    01 timelevels 11 1
11                    10                    01 variable type 11 REAL
11 diffslowxgf 10 diffslowxgf 01 compact 11 0
11                    10                    01 description 11 difference to analytic solution in grid function
11                    10                    01 dimensions 11 3
11                    10                    01 distribution 11 DEFAULT
11                    10                    01 group type 11 GF
11                    10                    01 timelevels 11 1
11                    10                    01 variable type 11 REAL
11 analyticslowxgf 10 analyticslowxgf 01 compact 11 0
11                    10                    01 description 11 analytic solution in grid function
11                    10                    01 dimensions 11 3
11                    10                    01 distribution 11 DEFAULT
11                    10                    01 group type 11 GF
11                    10                    01 timelevels 11 1
11                    10                    01 variable type 11 REAL
11 evolvedxga 10 evolvedxga 01 compact 11 0
11                    10                    01 description 11 an evolved grid array
11                    10                    01 dimensions 11 1
11                    10                    01 distribution 11 CONSTANT
11                    10                    01 group type 11 ARRAY

11                    10                    01  size 11 1

11                    10                    01 timelevels 11 3
11                    10                    01 variable type 11 REAL
11 rhsxga 10 rhsxga 01 compact 11 0
11                    10                    01 description 11 the rhs of the evolved grid array
11                    10                    01 dimensions 11 1
11                    10                    01 distribution 11 CONSTANT
11                    10                    01 group type 11 ARRAY

11                    10                    01  size 11 1

11                    10                    01 timelevels 11 3
11                    10                    01 variable type 11 REAL

11 x Group Names x 10 x Variable Names x01 Details x 11 x
11 constrainedxga 10 constrainedxga 01 compact 11 0
11                    10                    01 description 11 a constrained grid array
11                    10                    01 dimensions 11 1
11                    10                    01 distribution 11 CONSTANT
11                    10                    01 group type 11 ARRAY

11                    10                    01  size 11 1

11                    10                    01 timelevels 11 3
11                    10                    01 variable type 11 REAL
11 sandrxga 10 sandrxga 01 compact 11 0
11                    10                    01 description 11 a save-and-restore grid array
11                    10                    01 dimensions 11 1
11                    10                    01 distribution 11 CONSTANT
11                    10                    01 group type 11 ARRAY

11                    10                    01  size 11 1

11                    10                    01 timelevels 11 3
11                    10                    01 variable type 11 REAL
11 diffxga 10 diffxga 01 compact 11 0
11                    10                    01 description 11 difference to analytic solution in grid function
11                    10                    01 dimensions 11 1
11                    10                    01 distribution 11 CONSTANT
11                    10                    01 group type 11 ARRAY

11                    10                    01  size 11 1

11                    10                    01 timelevels 11 3
11                    10                    01 variable type 11 REAL
11 analyticxga 10 analyticxga 01 compact 11 0
11                    10                    01 description 11 analytic solution in grid function
11                    10                    01 dimensions 11 1
11                    10                    01 distribution 11 CONSTANT
11                    10                    01 group type 11 ARRAY

11                    10                    01  size 11 1

11                    10                    01 timelevels 11 3
11                    10                    01 variable type 11 REAL

11

7 Schedule This section lists all the variables which are assigned storage by thorn CactusTest/TestMoL. 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 x

11 Always:  11 x
11 evolvedxgf[3] evolvedslowxgf[3] constrainedxgf[3] sandrxgf[3] 11 x
11 rhsxgf[1] rhsslowxgf[1]  11 x
11 diffxgf[1] analyticxgf[1] diffslowxgf[1] analyticslowxgf[1]  11 x
11 evolvedxga[3] constrainedxga[3] sandrxga[3]  11 x
11 rhsxga[1]  11 x
11 diffxga[1] analyticxga[1]  11 x

11 x  11 x

Scheduled Functions

MoLxRegister x testmolxregistervars x register evolved, rhs variables x

11 x 11 Language: 11 c
11 x 11 Options: 11 meta
11 x 11 Type:  11 function

11

CCTKxINITIAL x testmolxinitvars x provide initial data for all variables x

11 x 11 Language: 11 c
11 x 11 Type:  11 function

11

MoLxCalcRHS x testmolxrhsxgf x compute the rhs for the evolved grid function x

11 x 11 Language: 11 c
11 x 11 Type:  11 function

11

MoLxCalcRHS x testmolxrhsslowxgf x compute the rhs for the slow evolved grid function x

11 x 11 Language: 11 c
11 x 11 Type:  11 function

11

MoLxCalcRHS x testmolxrhsxga x compute the rhs for the evolved grid function x

11 x 11 Language: 11 c
11 x 11 Type:  11 function

11

CCTKxANALYSIS x testmolxcomparexgf x compare analytic and numerial result in grid function x

11 x 11 Language: 11 c
11 x 11 Type:  11 function

11

CCTKxANALYSIS x testmolxcomparexga x compare analytic and numerial result in grid array x

11 x 11 Language: 11 c
11 x 11 Type:  11 function