einsteintoolkit / CactusExamples_Poisson.json
xinshuo's picture
Upload folder using huggingface_hub
10a2580 verified
Raw
History Blame Contribute Delete
35.4 kB
{
"thorn_name": "CactusExamples/Poisson",
"url": "https://bitbucket.org/cactuscode/cactusexamples.git",
"configuration": "# Configuration definition for thorn Poisson\n\nREQUIRES Boundary Carpet CartGrid3D TATelliptic\n",
"interface": "# Interface definition for thorn Poisson\n\nIMPLEMENTS: Poisson\n\nINHERITS: boundary grid\n\nUSES INCLUDE HEADER: carpet.h\nUSES INCLUDE HEADER: TATelliptic.h\n\n\n\nCCTK_INT FUNCTION Boundary_SelectGroupForBC \\\n (CCTK_POINTER_TO_CONST IN cctkGH, \\\n CCTK_INT IN faces, \\\n CCTK_INT IN boundary_width, \\\n CCTK_INT IN table_handle, \\\n CCTK_STRING IN group_name, \\\n CCTK_STRING IN bc_name)\nREQUIRES FUNCTION Boundary_SelectGroupForBC\n\n\n\nCCTK_REAL potential TYPE=gf\n{\n phi\n} \"Potential for elliptic equation\"\n\nCCTK_REAL residual TYPE=gf\n{\n res\n} \"Residual for elliptic equation\"\n",
"param": "# Parameter definitions for thorn Poisson\n\nSTRING solver \"Name of TATelliptic solver that should be used\"\n{\n .* :: \"must be an activated TATelliptic solver\"\n} \"TATJacobi\"\n\nSTRING options \"Options for the solver\"\n{\n .* :: \"no restriction\"\n} \"\"\n\n\n\nREAL radius \"Radius of uniformly charged sphere\"\n{\n 0:* :: \"\"\n} 1.0\n\nREAL charge \"Charge of uniformly charged sphere\"\n{\n *:* :: \"\"\n} 1.0\n",
"schedule": "# Schedule definitions for thorn Poisson\n\nSTORAGE: potential residual\n\nSCHEDULE Poisson_prepare AT initial\n{\n LANG: C\n WRITES: Poisson::phi(Everywhere)\n} \"Set up initial guess for initial data\"\n\nSCHEDULE Poisson_solve AT postinitial\n{\n LANG: C\n WRITES: Poisson::res(Interior)\n READS: Poisson::phi(Everywhere)\n READS: Grid::coordinates(Interior)\n # OPTIONS: global\n} \"Calculate uniform charge initial data\"\n\nSCHEDULE GROUP Poisson_boundaries\n{\n} \"Apply boundary conditions to initial data\"\n\nSCHEDULE Poisson_boundaries_select IN Poisson_boundaries\n{\n LANG: C\n OPTIONS: level\n SYNC: potential\n} \"Select boundary conditions for initial data\"\n\nSCHEDULE GROUP ApplyBCs AS Poisson_boundaries_apply IN Poisson_boundaries AFTER Poisson_boundaries_select\n{\n} \"Apply boundary conditions to initial data\"\n",
"src": {
"make.code.defn": "# Main make.code.defn file for thorn Poisson\n\n# Source files in this directory\nSRCS = uniform_charge.c\n\n# Subdirectories containing source files\nSUBDIRS = \n\n",
"uniform_charge.c": "#include <assert.h>\n#include <math.h>\n#include <stdio.h>\n#include <stdlib.h>\n\n#include <cctk.h>\n#include <cctk_Arguments.h>\n#include <cctk_Parameters.h>\n\n#include <util_ErrorCodes.h>\n#include <util_Table.h>\n\n#include <carpet.h>\n\n#include <TATelliptic.h>\n\n\n\nstatic int calc_residual (const cGH * const cctkGH,\n int const options_table,\n void * const userdata);\nstatic int apply_bounds (const cGH * const cctkGH,\n int const options_table,\n void * const userdata);\nstatic void apply_bounds_level (CCTK_ARGUMENTS);\n\n\n\nvoid Poisson_prepare (CCTK_ARGUMENTS)\n{\n DECLARE_CCTK_ARGUMENTS_Poisson_prepare;\n DECLARE_CCTK_PARAMETERS;\n \n /* Initial data for the solver */\n#pragma omp parallel for collapse(3)\n for (int k=0; k<cctk_lsh[2]; ++k) {\n for (int j=0; j<cctk_lsh[1]; ++j) {\n for (int i=0; i<cctk_lsh[0]; ++i) {\n\tint ipos = CCTK_GFINDEX3D(cctkGH,i,j,k);\n\tphi[ipos] = 0;\n }\n }\n }\n}\n\n\n\nvoid Poisson_solve (CCTK_ARGUMENTS)\n{\n DECLARE_CCTK_ARGUMENTS_Poisson_solve;\n DECLARE_CCTK_PARAMETERS;\n \n int ierr;\n \n /* Grid variables for the solver */\n#define NVAR 1 /* number of equations to solve */\n int var_ind[NVAR];\t\t/* index of variable */\n int res_ind[NVAR];\t\t/* index of residual */\n var_ind[0] = CCTK_VarIndex (\"Poisson::phi\");\n res_ind[0] = CCTK_VarIndex (\"Poisson::res\");\n \n /* Options for the solver */\n int options_table = Util_TableCreateFromString (options);\n assert (options_table>=0);\n \n /* Call solver */\n ierr = TATelliptic_CallSolver (cctkGH, var_ind, res_ind, NVAR,\n\t\t\t\t options_table,\n\t\t\t\t calc_residual, apply_bounds, 0,\n\t\t\t\t solver);\n if (ierr!=0) {\n CCTK_WARN (CCTK_WARN_ALERT, \"Failed to solve elliptic equation\");\n }\n \n ierr = Util_TableDestroy (options_table);\n assert (!ierr);\n}\n\n\n\n/* Caculate the residual */\nint calc_residual (const cGH * const cctkGH,\n int const options_table,\n void * const userdata)\n{\n DECLARE_CCTK_ARGUMENTS_Poisson_solve;\n DECLARE_CCTK_PARAMETERS;\n \n /* charge density */\n CCTK_REAL rho = charge / (4.0/3.0 * M_PI * pow(radius,3));\n \n /* offsets for 3D array layout */\n int di = CCTK_GFINDEX3D(cctkGH,1,0,0) - CCTK_GFINDEX3D(cctkGH,0,0,0);\n int dj = CCTK_GFINDEX3D(cctkGH,0,1,0) - CCTK_GFINDEX3D(cctkGH,0,0,0);\n int dk = CCTK_GFINDEX3D(cctkGH,0,0,1) - CCTK_GFINDEX3D(cctkGH,0,0,0);\n \n CCTK_REAL idx2[3];\t\t/* inverse squared grid spacing */\n for (int d=0; d<3; ++d) {\n idx2[d] = 1.0 / pow(CCTK_DELTA_SPACE(d), 2);\n }\n \n for (int d=0; d<3; ++d) {\n assert (cctk_nghostzones[d] >= 1);\n }\n\n /* Initialize residual to zero:\n We only do this to ensure the boundaries of the residual are\n defined, and are not nan. That in turn is only needed to make\n output look nicer. */\n#pragma omp parallel for collapse(3)\n for (int k=0; k<cctk_lsh[2]; ++k) {\n for (int j=0; j<cctk_lsh[1]; ++j) {\n for (int i=0; i<cctk_lsh[0]; ++i) {\n\tint ipos = CCTK_GFINDEX3D(cctkGH,i,j,k);\n res[ipos] = 0.0;\n }\n }\n }\n \n /* Calculate residual:\n res = Laplace phi + 4 pi rho */\n#pragma omp parallel for collapse(3)\n for (int k=cctk_nghostzones[2]; k<cctk_lsh[2]-cctk_nghostzones[2]; ++k) {\n for (int j=cctk_nghostzones[1]; j<cctk_lsh[1]-cctk_nghostzones[1]; ++j) {\n for (int i=cctk_nghostzones[0]; i<cctk_lsh[0]-cctk_nghostzones[0]; ++i) {\n\tint ipos = CCTK_GFINDEX3D(cctkGH,i,j,k);\n\tres[ipos] = \n\t + (phi[ipos-di] - 2*phi[ipos] + phi[ipos+di]) * idx2[0]\n\t + (phi[ipos-dj] - 2*phi[ipos] + phi[ipos+dj]) * idx2[1]\n\t + (phi[ipos-dk] - 2*phi[ipos] + phi[ipos+dk]) * idx2[2]\n\t + (r[ipos]<radius ? 4 * M_PI * rho : 0);\n }\n }\n }\n \n /* Success */\n return 0;\n}\n\n\n\n/* Apply the boundary conditions to the solution */\nint apply_bounds (const cGH * const cctkGH,\n int const options_table,\n void * const userdata)\n{\n DECLARE_CCTK_ARGUMENTS_Poisson_solve;\n DECLARE_CCTK_PARAMETERS;\n \n int ierr;\n \n /* Switch to level mode */\n ierr = CallLevelFunction ((cGH *)cctkGH, apply_bounds_level);\n assert (!ierr);\n \n /* Success */\n return 0;\n}\n\nvoid apply_bounds_level (CCTK_ARGUMENTS)\n{\n DECLARE_CCTK_ARGUMENTS_Poisson_solve;\n DECLARE_CCTK_PARAMETERS;\n \n int ierr;\n \n /* Call boundary condition schedule group */\n ierr = CallScheduleGroup (cctkGH, \"Poisson_boundaries\");\n assert (!ierr);\n}\n\nvoid Poisson_boundaries_select (CCTK_ARGUMENTS)\n{\n DECLARE_CCTK_ARGUMENTS_Poisson_boundaries_select;\n DECLARE_CCTK_PARAMETERS;\n \n int ierr;\n \n /* Select Direchlet boundary conditions */\n ierr = Boundary_SelectGroupForBC\n (cctkGH, CCTK_ALL_FACES, 1, -1, \"Poisson::potential\", \"scalar\");\n assert (!ierr);\n}\n"
},
"test": {
"test.ccl": "ABSTOL 1.0e-10\nRELTOL 1.0\n",
"charge_tatelliptic_petsc.par": "ActiveThorns = \"\n Boundary\n Carpet\n CarpetIOASCII\n CarpetIOBasic\n CarpetIOScalar\n CarpetLib\n CarpetReduce\n CartGrid3D\n CoordBase\n IOUtil\n PETSc\n Poisson\n SymBase\n TATPETSc\n TATelliptic\n Time\n\"\n\nCactus::cctk_full_warnings = yes\nCactus::cctk_timer_output = \"full\"\n\nCactus::cctk_itlast = 0\n\nCarpet::domain_from_coordbase = yes\nCartGrid3D::type = \"coordbase\"\n\nCoordBase::domainsize = \"minmax\"\nCoordBase::xmin = -10.0\nCoordBase::ymin = -10.0\nCoordBase::zmin = -10.0\nCoordBase::xmax = +10.0\nCoordBase::ymax = +10.0\nCoordBase::zmax = +10.0\nCoordBase::dx = 0.5\nCoordBase::dy = 0.5\nCoordBase::dz = 0.5\n\nPoisson::solver = \"TATPETSc\"\n\nTATPETSc::verbose = yes\nTATPETSc::options = \"\n -snes_atol 1e-8\n -snes_stol 1e-8\n -snes_monitor\n -ksp_monitor\n\"\n\nIO::out_dir = $parfile\nIO::out_group_separator = \"-\"\n\nIOBasic::outInfo_every = 1\nIOBasic::outInfo_vars = \"\n Poisson::phi\n Poisson::res\n\"\n\nIOScalar::one_file_per_group = yes\nIOScalar::outScalar_reductions = \"norm2 norm_inf\"\nIOScalar::outScalar_every = 1\nIOScalar::outScalar_vars = \"\n Poisson::potential\n Poisson::residual\n\"\n\nIOASCII::one_file_per_group = yes\nIOASCII::compact_format = yes\nIOASCII::output_ghost_points = no\nIOASCII::out1D_every = 1\nIOASCII::out1D_vars = \"\n Poisson::potential\n Poisson::residual\n\"\n",
"charge_tatelliptic_petsc/poisson-residual.y.asc": "# 1D ASCII output created by CarpetIOASCII\n# created on redshift.pi.local by eschnett on Nov 25 2014 at 12:15:40-0500\n# parameter filename: \"/Users/eschnett/Cbeta/arrangements/CactusExamples/Poisson/test/charge_tatelliptic_petsc.par\"\n#\n# POISSON::RESIDUAL y (poisson-residual)\n#\n# iteration 0 time 0\n# time level 0\n# refinement level 0 multigrid level 0 map 0 component 0\n0\t20 0 20\t0\t0 -10 0\t0\n0\t20 1 20\t0\t0 -9.5 0\t4.31751856488916e-13\n0\t20 2 20\t0\t0 -9 0\t-9.07926511750645e-13\n0\t20 3 20\t0\t0 -8.5 0\t-2.13387640890517e-12\n0\t20 4 20\t0\t0 -8 0\t-1.13101195076126e-12\n0\t20 5 20\t0\t0 -7.5 0\t8.46100967066832e-13\n0\t20 6 20\t0\t0 -7 0\t-4.35040892199368e-13\n0\t20 7 20\t0\t0 -6.5 0\t-4.01129129912192e-12\n0\t20 8 20\t0\t0 -6 0\t-6.56036336366128e-12\n0\t20 9 20\t0\t0 -5.5 0\t-6.23057161419638e-12\n0\t20 10 20\t0\t0 -5 0\t-5.4355409062623e-12\n0\t20 11 20\t0\t0 -4.5 0\t-7.59969864816412e-12\n0\t20 12 20\t0\t0 -4 0\t-7.82907072505168e-12\n0\t20 13 20\t0\t0 -3.5 0\t-9.5936592003909e-12\n0\t20 14 20\t0\t0 -3 0\t-1.40856215580243e-11\n0\t20 15 20\t0\t0 -2.5 0\t-7.96918087075937e-12\n0\t20 16 20\t0\t0 -2 0\t-9.67492752579346e-12\n0\t20 17 20\t0\t0 -1.5 0\t8.4998674765302e-13\n0\t20 18 20\t0\t0 -1 0\t-1.13491438469282e-11\n0\t20 19 20\t0\t0 -0.5 0\t3.41100481193735e-11\n0\t20 20 20\t0\t0 0 0\t2.47095677252673e-11\n0\t20 21 20\t0\t0 0.5 0\t3.47477602247181e-11\n0\t20 22 20\t0\t0 1 0\t-1.00488506404872e-11\n0\t20 23 20\t0\t0 1.5 0\t2.8537172624965e-12\n0\t20 24 20\t0\t0 2 0\t-7.16005033041256e-12\n0\t20 25 20\t0\t0 2.5 0\t-5.23936449781104e-12\n0\t20 26 20\t0\t0 3 0\t-1.11746167874571e-11\n0\t20 27 20\t0\t0 3.5 0\t-6.28630481003256e-12\n0\t20 28 20\t0\t0 4 0\t-3.93862720216021e-12\n0\t20 29 20\t0\t0 4.5 0\t-3.34321459405373e-12\n0\t20 30 20\t0\t0 5 0\t-1.2623235789988e-12\n0\t20 31 20\t0\t0 5.5 0\t-2.42872388866999e-12\n0\t20 32 20\t0\t0 6 0\t-3.01741964747748e-12\n0\t20 33 20\t0\t0 6.5 0\t-5.27466958999412e-13\n0\t20 34 20\t0\t0 7 0\t2.91500157345581e-12\n0\t20 35 20\t0\t0 7.5 0\t3.80762088525444e-12\n0\t20 36 20\t0\t0 8 0\t1.01302299881922e-12\n0\t20 37 20\t0\t0 8.5 0\t-7.16149362034457e-13\n0\t20 38 20\t0\t0 9 0\t6.0437765903032e-14\n0\t20 39 20\t0\t0 9.5 0\t1.16005816064302e-12\n0\t20 40 20\t0\t0 10 0\t0\n\n",
"charge_tatelliptic_petsc/poisson-potential.x.asc": "# 1D ASCII output created by CarpetIOASCII\n# created on redshift.pi.local by eschnett on Nov 25 2014 at 12:15:40-0500\n# parameter filename: \"/Users/eschnett/Cbeta/arrangements/CactusExamples/Poisson/test/charge_tatelliptic_petsc.par\"\n#\n# POISSON::POTENTIAL x (poisson-potential)\n#\n# iteration 0 time 0\n# time level 0\n# refinement level 0 multigrid level 0 map 0 component 0\n# column format: 1:it\t2:ix 3:iy 4:iz\t5:time\t6:x 7:y 8:z\t9:data\n# data columns: 9:phi\n0\t0 20 20\t0\t-10 0 0\t0\n0\t1 20 20\t0\t-9.5 0 0\t0.00627749117947932\n0\t2 20 20\t0\t-9 0 0\t0.0126835244835473\n0\t3 20 20\t0\t-8.5 0 0\t0.0193529409183833\n0\t4 20 20\t0\t-8 0 0\t0.0264338765887787\n0\t5 20 20\t0\t-7.5 0 0\t0.0340962886315895\n0\t6 20 20\t0\t-7 0 0\t0.0425431543372189\n0\t7 20 20\t0\t-6.5 0 0\t0.052026074398129\n0\t8 20 20\t0\t-6 0 0\t0.0628680823478477\n0\t9 20 20\t0\t-5.5 0 0\t0.0754984404605289\n0\t10 20 20\t0\t-5 0 0\t0.090507977993319\n0\t11 20 20\t0\t-4.5 0 0\t0.108741058514958\n0\t12 20 20\t0\t-4 0 0\t0.131456081903248\n0\t13 20 20\t0\t-3.5 0 0\t0.160621609435921\n0\t14 20 20\t0\t-3 0 0\t0.199498220164873\n0\t15 20 20\t0\t-2.5 0 0\t0.253863132570558\n0\t16 20 20\t0\t-2 0 0\t0.334770639110654\n0\t17 20 20\t0\t-1.5 0 0\t0.465128197233299\n0\t18 20 20\t0\t-1 0 0\t0.695600884064599\n0\t19 20 20\t0\t-0.5 0 0\t1.13959099905804\n0\t20 20 20\t0\t0 0 0\t1.26459099905636\n0\t21 20 20\t0\t0.5 0 0\t1.13959099905667\n0\t22 20 20\t0\t1 0 0\t0.695600884061847\n0\t23 20 20\t0\t1.5 0 0\t0.465128197229212\n0\t24 20 20\t0\t2 0 0\t0.334770639105381\n0\t25 20 20\t0\t2.5 0 0\t0.253863132564283\n0\t26 20 20\t0\t3 0 0\t0.19949822015775\n0\t27 20 20\t0\t3.5 0 0\t0.160621609428107\n0\t28 20 20\t0\t4 0 0\t0.13145608189488\n0\t29 20 20\t0\t4.5 0 0\t0.108741058506192\n0\t30 20 20\t0\t5 0 0\t0.0905079779844795\n0\t31 20 20\t0\t5.5 0 0\t0.0754984404518741\n0\t32 20 20\t0\t6 0 0\t0.062868082339477\n0\t33 20 20\t0\t6.5 0 0\t0.0520260743902586\n0\t34 20 20\t0\t7 0 0\t0.0425431543300983\n0\t35 20 20\t0\t7.5 0 0\t0.0340962886253866\n0\t36 20 20\t0\t8 0 0\t0.0264338765835658\n0\t37 20 20\t0\t8.5 0 0\t0.0193529409143329\n0\t38 20 20\t0\t9 0 0\t0.0126835244807971\n0\t39 20 20\t0\t9.5 0 0\t0.0062774911780977\n0\t40 20 20\t0\t10 0 0\t0\n\n",
"charge_tatelliptic_petsc/poisson-potential.y.asc": "# 1D ASCII output created by CarpetIOASCII\n# created on redshift.pi.local by eschnett on Nov 25 2014 at 12:15:40-0500\n# parameter filename: \"/Users/eschnett/Cbeta/arrangements/CactusExamples/Poisson/test/charge_tatelliptic_petsc.par\"\n#\n# POISSON::POTENTIAL y (poisson-potential)\n#\n# iteration 0 time 0\n# time level 0\n# refinement level 0 multigrid level 0 map 0 component 0\n0\t20 0 20\t0\t0 -10 0\t0\n0\t20 1 20\t0\t0 -9.5 0\t0.0062774911829349\n0\t20 2 20\t0\t0 -9 0\t0.0126835244903476\n0\t20 3 20\t0\t0 -8.5 0\t0.0193529409277189\n0\t20 4 20\t0\t0 -8 0\t0.026433876600512\n0\t20 5 20\t0\t0 -7.5 0\t0.0340962886459323\n0\t20 6 20\t0\t0 -7 0\t0.0425431543543983\n0\t20 7 20\t0\t0 -6.5 0\t0.0520260744173056\n0\t20 8 20\t0\t0 -6 0\t0.0628680823684697\n0\t20 9 20\t0\t0 -5.5 0\t0.0754984404810975\n0\t20 10 20\t0\t0 -5 0\t0.0905079780127036\n0\t20 11 20\t0\t0 -4.5 0\t0.108741058533365\n0\t20 12 20\t0\t0 -4 0\t0.131456081919769\n0\t20 13 20\t0\t0 -3.5 0\t0.160621609450485\n0\t20 14 20\t0\t0 -3 0\t0.199498220177593\n0\t20 15 20\t0\t0 -2.5 0\t0.253863132580797\n0\t20 16 20\t0\t0 -2 0\t0.334770639118676\n0\t20 17 20\t0\t0 -1.5 0\t0.46512819723794\n0\t20 18 20\t0\t0 -1 0\t0.695600884067612\n0\t20 19 20\t0\t0 -0.5 0\t1.13959099905895\n0\t20 20 20\t0\t0 0 0\t1.26459099905636\n0\t20 21 20\t0\t0 0.5 0\t1.13959099905546\n0\t20 22 20\t0\t0 1 0\t0.695600884060718\n0\t20 23 20\t0\t0 1.5 0\t0.46512819722782\n0\t20 24 20\t0\t0 2 0\t0.334770639105622\n0\t20 25 20\t0\t0 2.5 0\t0.253863132565177\n0\t20 26 20\t0\t0 3 0\t0.199498220159798\n0\t20 27 20\t0\t0 3.5 0\t0.160621609430911\n0\t20 28 20\t0\t0 4 0\t0.131456081898862\n0\t20 29 20\t0\t0 4.5 0\t0.108741058511656\n0\t20 30 20\t0\t0 5 0\t0.0905079779907799\n0\t20 31 20\t0\t0 5.5 0\t0.0754984404595273\n0\t20 32 20\t0\t0 6 0\t0.0628680823477594\n0\t20 33 20\t0\t0 6.5 0\t0.052026074397924\n0\t20 34 20\t0\t0 7 0\t0.0425431543368102\n0\t20 35 20\t0\t0 7.5 0\t0.0340962886305849\n0\t20 36 20\t0\t0 8 0\t0.026433876587808\n0\t20 37 20\t0\t0 8.5 0\t0.0193529409179491\n0\t20 38 20\t0\t0 9 0\t0.0126835244837065\n0\t20 39 20\t0\t0 9.5 0\t0.00627749117955605\n0\t20 40 20\t0\t0 10 0\t0\n\n",
"charge_tatelliptic_petsc/poisson-residual.x.asc": "# 1D ASCII output created by CarpetIOASCII\n# created on redshift.pi.local by eschnett on Nov 25 2014 at 12:15:40-0500\n# parameter filename: \"/Users/eschnett/Cbeta/arrangements/CactusExamples/Poisson/test/charge_tatelliptic_petsc.par\"\n#\n# POISSON::RESIDUAL x (poisson-residual)\n#\n# iteration 0 time 0\n# time level 0\n# refinement level 0 multigrid level 0 map 0 component 0\n# column format: 1:it\t2:ix 3:iy 4:iz\t5:time\t6:x 7:y 8:z\t9:data\n# data columns: 9:res\n0\t0 20 20\t0\t-10 0 0\t0\n0\t1 20 20\t0\t-9.5 0 0\t8.52942716456084e-13\n0\t2 20 20\t0\t-9 0 0\t2.94424207236688e-12\n0\t3 20 20\t0\t-8.5 0 0\t-1.55289670011882e-12\n0\t4 20 20\t0\t-8 0 0\t-2.43224884677318e-12\n0\t5 20 20\t0\t-7.5 0 0\t-2.40030217923959e-13\n0\t6 20 20\t0\t-7 0 0\t4.47170078743397e-12\n0\t7 20 20\t0\t-6.5 0 0\t1.33099087307187e-12\n0\t8 20 20\t0\t-6 0 0\t3.31767946448736e-12\n0\t9 20 20\t0\t-5.5 0 0\t9.44133660141233e-13\n0\t10 20 20\t0\t-5 0 0\t-5.26845234105622e-12\n0\t11 20 20\t0\t-4.5 0 0\t-3.97570865118269e-13\n0\t12 20 20\t0\t-4 0 0\t-2.98738811466137e-12\n0\t13 20 20\t0\t-3.5 0 0\t-4.0512038168572e-12\n0\t14 20 20\t0\t-3 0 0\t-9.37760979979885e-12\n0\t15 20 20\t0\t-2.5 0 0\t-1.02022834624904e-11\n0\t16 20 20\t0\t-2 0 0\t-1.4006573678671e-12\n0\t17 20 20\t0\t-1.5 0 0\t-5.55555601522428e-13\n0\t18 20 20\t0\t-1 0 0\t-1.95932159385848e-12\n0\t19 20 20\t0\t-0.5 0 0\t2.99178459783889e-11\n0\t20 20 20\t0\t0 0 0\t2.47095677252673e-11\n0\t21 20 20\t0\t0.5 0 0\t2.99613667209542e-11\n0\t22 20 20\t0\t1 0 0\t-1.57829305180712e-12\n0\t23 20 20\t0\t1.5 0 0\t3.47277762102749e-13\n0\t24 20 20\t0\t2 0 0\t-3.21964677141295e-13\n0\t25 20 20\t0\t2.5 0 0\t-9.27902199521213e-12\n0\t26 20 20\t0\t3 0 0\t-8.42526048927539e-12\n0\t27 20 20\t0\t3.5 0 0\t-3.11084491499969e-12\n0\t28 20 20\t0\t4 0 0\t-1.79589676463365e-12\n0\t29 20 20\t0\t4.5 0 0\t1.65079061531515e-12\n0\t30 20 20\t0\t5 0 0\t-3.44679840225126e-12\n0\t31 20 20\t0\t5.5 0 0\t2.08300043880172e-12\n0\t32 20 20\t0\t6 0 0\t4.93949325885978e-12\n0\t33 20 20\t0\t6.5 0 0\t3.15492076907731e-12\n0\t34 20 20\t0\t7 0 0\t5.90927307086986e-12\n0\t35 20 20\t0\t7.5 0 0\t6.61803944979056e-13\n0\t36 20 20\t0\t8 0 0\t-1.1394218901728e-12\n0\t37 20 20\t0\t8.5 0 0\t-5.02237140764805e-13\n0\t38 20 20\t0\t9 0 0\t3.56287221947582e-12\n0\t39 20 20\t0\t9.5 0 0\t1.05664782479309e-12\n0\t40 20 20\t0\t10 0 0\t0\n\n",
"charge_tatelliptic_petsc/poisson-residual.d.asc": "# 1D ASCII output created by CarpetIOASCII\n# created on redshift.pi.local by eschnett on Nov 25 2014 at 12:15:40-0500\n# parameter filename: \"/Users/eschnett/Cbeta/arrangements/CactusExamples/Poisson/test/charge_tatelliptic_petsc.par\"\n#\n# POISSON::RESIDUAL d (poisson-residual)\n#\n# iteration 0 time 0\n# time level 0\n# refinement level 0 multigrid level 0 map 0 component 0\n0\t0 0 0\t0\t-10 -10 -10\t0\n0\t1 1 1\t0\t-9.5 -9.5 -9.5\t2.71050543121376e-20\n0\t2 2 2\t0\t-9 -9 -9\t6.27807267977731e-14\n0\t3 3 3\t0\t-8.5 -8.5 -8.5\t9.87812262542853e-14\n0\t4 4 4\t0\t-8 -8 -8\t-3.28362337320698e-13\n0\t5 5 5\t0\t-7.5 -7.5 -7.5\t-1.78093650937683e-13\n0\t6 6 6\t0\t-7 -7 -7\t1.67852537424906e-12\n0\t7 7 7\t0\t-6.5 -6.5 -6.5\t3.51832452061274e-12\n0\t8 8 8\t0\t-6 -6 -6\t4.18143297764573e-12\n0\t9 9 9\t0\t-5.5 -5.5 -5.5\t4.3804682103854e-12\n0\t10 10 10\t0\t-5 -5 -5\t3.38420957923802e-12\n0\t11 11 11\t0\t-4.5 -4.5 -4.5\t2.06740180530574e-12\n0\t12 12 12\t0\t-4 -4 -4\t-2.69173572320369e-13\n0\t13 13 13\t0\t-3.5 -3.5 -3.5\t-2.90234503097508e-12\n0\t14 14 14\t0\t-3 -3 -3\t-2.93709501164585e-12\n0\t15 15 15\t0\t-2.5 -2.5 -2.5\t-4.21462864608202e-12\n0\t16 16 16\t0\t-2 -2 -2\t-4.29989377437323e-12\n0\t17 17 17\t0\t-1.5 -1.5 -1.5\t-5.67257352201977e-12\n0\t18 18 18\t0\t-1 -1 -1\t-7.26574356235687e-12\n0\t19 19 19\t0\t-0.5 -0.5 -0.5\t1.38409284033969e-11\n0\t20 20 20\t0\t0 0 0\t2.47095677252673e-11\n0\t21 21 21\t0\t0.5 0.5 0.5\t1.45434775333797e-11\n0\t22 22 22\t0\t1 1 1\t-5.38147304496306e-12\n0\t23 23 23\t0\t1.5 1.5 1.5\t-3.00426350463567e-12\n0\t24 24 24\t0\t2 2 2\t-1.54165569199449e-12\n0\t25 25 25\t0\t2.5 2.5 2.5\t-1.68931535426964e-12\n0\t26 26 26\t0\t3 3 3\t-1.18238752122579e-12\n0\t27 27 27\t0\t3.5 3.5 3.5\t-2.11697326335525e-12\n0\t28 28 28\t0\t4 4 4\t-9.85878045867139e-14\n0\t29 29 29\t0\t4.5 4.5 4.5\t1.89043225518049e-12\n0\t30 30 30\t0\t5 5 5\t2.63630783869928e-12\n0\t31 31 31\t0\t5.5 5.5 5.5\t2.92174617833041e-12\n0\t32 32 32\t0\t6 6 6\t2.43270681377084e-12\n0\t33 33 33\t0\t6.5 6.5 6.5\t2.07457662160238e-12\n0\t34 34 34\t0\t7 7 7\t6.00824945351519e-13\n0\t35 35 35\t0\t7.5 7.5 7.5\t-1.1524704801591e-12\n0\t36 36 36\t0\t8 8 8\t-1.11070180830453e-12\n0\t37 37 37\t0\t8.5 8.5 8.5\t-2.52968652969532e-13\n0\t38 38 38\t0\t9 9 9\t3.34433002124879e-14\n0\t39 39 39\t0\t9.5 9.5 9.5\t5.51587855252e-17\n0\t40 40 40\t0\t10 10 10\t0\n",
"charge_tatelliptic_petsc/poisson-potential.d.asc": "# 1D ASCII output created by CarpetIOASCII\n# created on redshift.pi.local by eschnett on Nov 25 2014 at 12:15:40-0500\n# parameter filename: \"/Users/eschnett/Cbeta/arrangements/CactusExamples/Poisson/test/charge_tatelliptic_petsc.par\"\n#\n# POISSON::POTENTIAL d (poisson-potential)\n#\n# iteration 0 time 0\n# time level 0\n# refinement level 0 multigrid level 0 map 0 component 0\n0\t0 0 0\t0\t-10 -10 -10\t0\n0\t1 1 1\t0\t-9.5 -9.5 -9.5\t2.4098008054375e-05\n0\t2 2 2\t0\t-9 -9 -9\t0.00019280381121681\n0\t3 3 3\t0\t-8.5 -8.5 -8.5\t0.000650944809476893\n0\t4 4 4\t0\t-8 -8 -8\t0.00154436778183773\n0\t5 5 5\t0\t-7.5 -7.5 -7.5\t0.0030219745990147\n0\t6 6 6\t0\t-7 -7 -7\t0.00523981743294181\n0\t7 7 7\t0\t-6.5 -6.5 -6.5\t0.00836838331658588\n0\t8 8 8\t0\t-6 -6 -6\t0.012604750018168\n0\t9 9 9\t0\t-5.5 -5.5 -5.5\t0.0181923264944193\n0\t10 10 10\t0\t-5 -5 -5\t0.0254529040712643\n0\t11 11 11\t0\t-4.5 -4.5 -4.5\t0.0348398539074917\n0\t12 12 12\t0\t-4 -4 -4\t0.0470301400972462\n0\t13 13 13\t0\t-3.5 -3.5 -3.5\t0.0630930936969164\n0\t14 14 14\t0\t-3 -3 -3\t0.0848245888731879\n0\t15 15 15\t0\t-2.5 -2.5 -2.5\t0.115477097114543\n0\t16 16 16\t0\t-2 -2 -2\t0.161577857269467\n0\t17 17 17\t0\t-1.5 -1.5 -1.5\t0.238398170164318\n0\t18 18 18\t0\t-1 -1 -1\t0.39258924128532\n0\t19 19 19\t0\t-0.5 -0.5 -0.5\t0.93870305734964\n0\t20 20 20\t0\t0 0 0\t1.26459099905636\n0\t21 21 21\t0\t0.5 0.5 0.5\t0.938703057345364\n0\t22 22 22\t0\t1 1 1\t0.392589241277191\n0\t23 23 23\t0\t1.5 1.5 1.5\t0.238398170153337\n0\t24 24 24\t0\t2 2 2\t0.161577857257024\n0\t25 25 25\t0\t2.5 2.5 2.5\t0.115477097102121\n0\t26 26 26\t0\t3 3 3\t0.0848245888621349\n0\t27 27 27\t0\t3.5 3.5 3.5\t0.0630930936881182\n0\t28 28 28\t0\t4 4 4\t0.0470301400910293\n0\t29 29 29\t0\t4.5 4.5 4.5\t0.0348398539038438\n0\t30 30 30\t0\t5 5 5\t0.0254529040699991\n0\t31 31 31\t0\t5.5 5.5 5.5\t0.0181923264950854\n0\t32 32 32\t0\t6 6 6\t0.0126047500200073\n0\t33 33 33\t0\t6.5 6.5 6.5\t0.00836838331879747\n0\t34 34 34\t0\t7 7 7\t0.00523981743500339\n0\t35 35 35\t0\t7.5 7.5 7.5\t0.00302197460068265\n0\t36 36 36\t0\t8 8 8\t0.00154436778297136\n0\t37 37 37\t0\t8.5 8.5 8.5\t0.000650944810049969\n0\t38 38 38\t0\t9 9 9\t0.000192803811396265\n0\t39 39 39\t0\t9.5 9.5 9.5\t2.40980080770687e-05\n0\t40 40 40\t0\t10 10 10\t0\n",
"charge_tatelliptic_petsc/poisson-potential.norm2.asc": "# Scalar ASCII output created by CarpetIOScalar\n# created on redshift.pi.local by eschnett on Nov 25 2014 at 12:15:40-0500\n# parameter filename: \"/Users/eschnett/Cbeta/arrangements/CactusExamples/Poisson/test/charge_tatelliptic_petsc.par\"\n#\n# POISSON::phi (poisson-potential)\n# 1:iteration 2:time 3:data\n# data columns: 3:phi\n0 0 0.0588831012602124\n",
"charge_tatelliptic_petsc/poisson-potential.norm_inf.asc": "# Scalar ASCII output created by CarpetIOScalar\n# created on redshift.pi.local by eschnett on Nov 25 2014 at 12:15:40-0500\n# parameter filename: \"/Users/eschnett/Cbeta/arrangements/CactusExamples/Poisson/test/charge_tatelliptic_petsc.par\"\n#\n# POISSON::phi (poisson-potential)\n# 1:iteration 2:time 3:data\n# data columns: 3:phi\n0 0 1.26459099905636\n",
"charge_tatelliptic_petsc/poisson-residual.z.asc": "# 1D ASCII output created by CarpetIOASCII\n# created on redshift.pi.local by eschnett on Nov 25 2014 at 12:15:40-0500\n# parameter filename: \"/Users/eschnett/Cbeta/arrangements/CactusExamples/Poisson/test/charge_tatelliptic_petsc.par\"\n#\n# POISSON::RESIDUAL z (poisson-residual)\n#\n# iteration 0 time 0\n# time level 0\n# refinement level 0 multigrid level 0 map 0 component 0\n0\t20 20 0\t0\t0 0 -10\t0\n0\t20 20 1\t0\t0 0 -9.5\t-1.10592784929864e-12\n0\t20 20 2\t0\t0 0 -9\t-2.94263224898117e-12\n0\t20 20 3\t0\t0 0 -8.5\t-4.61736204826479e-12\n0\t20 20 4\t0\t0 0 -8\t-5.36584665589146e-12\n0\t20 20 5\t0\t0 0 -7.5\t-5.30075983107281e-12\n0\t20 20 6\t0\t0 0 -7\t-5.07438535635174e-12\n0\t20 20 7\t0\t0 0 -6.5\t-4.75253170151291e-12\n0\t20 20 8\t0\t0 0 -6\t-4.01667588079135e-12\n0\t20 20 9\t0\t0 0 -5.5\t-3.72857300590113e-12\n0\t20 20 10\t0\t0 0 -5\t-4.60764759679932e-12\n0\t20 20 11\t0\t0 0 -4.5\t-4.54070114841443e-12\n0\t20 20 12\t0\t0 0 -4\t-1.87094784109831e-12\n0\t20 20 13\t0\t0 0 -3.5\t-1.13775655563586e-12\n0\t20 20 14\t0\t0 0 -3\t-6.14974737800367e-12\n0\t20 20 15\t0\t0 0 -2.5\t-1.06432640478715e-11\n0\t20 20 16\t0\t0 0 -2\t-6.97975011121343e-12\n0\t20 20 17\t0\t0 0 -1.5\t-7.20135062692862e-12\n0\t20 20 18\t0\t0 0 -1\t-8.01314570253453e-12\n0\t20 20 19\t0\t0 0 -0.5\t2.27093899241027e-11\n0\t20 20 20\t0\t0 0 0\t2.47095677252673e-11\n0\t20 20 21\t0\t0 0 0.5\t2.27111662809421e-11\n0\t20 20 22\t0\t0 0 1\t-7.93232146634182e-12\n0\t20 20 23\t0\t0 0 1.5\t-6.95443702625198e-12\n0\t20 20 24\t0\t0 0 2\t-6.56852350289228e-12\n0\t20 20 25\t0\t0 0 2.5\t-1.00686126103255e-11\n0\t20 20 26\t0\t0 0 3\t-5.39901456875214e-12\n0\t20 20 27\t0\t0 0 3.5\t-2.08499884024604e-13\n0\t20 20 28\t0\t0 0 4\t-7.42073069659455e-13\n0\t20 20 29\t0\t0 0 4.5\t-3.21154214333319e-12\n0\t20 20 30\t0\t0 0 5\t-3.20576898360514e-12\n0\t20 20 31\t0\t0 0 5.5\t-2.45348186211913e-12\n0\t20 20 32\t0\t0 0 6\t-3.04795078065467e-12\n0\t20 20 33\t0\t0 0 6.5\t-4.10427247743428e-12\n0\t20 20 34\t0\t0 0 7\t-4.69030370098267e-12\n0\t20 20 35\t0\t0 0 7.5\t-5.060285523939e-12\n0\t20 20 36\t0\t0 0 8\t-5.21915843876286e-12\n0\t20 20 37\t0\t0 0 8.5\t-4.60079196962226e-12\n0\t20 20 38\t0\t0 0 9\t-3.15654447025082e-12\n0\t20 20 39\t0\t0 0 9.5\t-1.53241308531449e-12\n0\t20 20 40\t0\t0 0 10\t0\n\n",
"charge_tatelliptic_petsc/poisson-residual.norm2.asc": "# Scalar ASCII output created by CarpetIOScalar\n# created on redshift.pi.local by eschnett on Nov 25 2014 at 12:15:40-0500\n# parameter filename: \"/Users/eschnett/Cbeta/arrangements/CactusExamples/Poisson/test/charge_tatelliptic_petsc.par\"\n#\n# POISSON::res (poisson-residual)\n# 1:iteration 2:time 3:data\n# data columns: 3:res\n0 0 3.1638046185321e-12\n",
"charge_tatelliptic_petsc/poisson-potential.z.asc": "# 1D ASCII output created by CarpetIOASCII\n# created on redshift.pi.local by eschnett on Nov 25 2014 at 12:15:40-0500\n# parameter filename: \"/Users/eschnett/Cbeta/arrangements/CactusExamples/Poisson/test/charge_tatelliptic_petsc.par\"\n#\n# POISSON::POTENTIAL z (poisson-potential)\n#\n# iteration 0 time 0\n# time level 0\n# refinement level 0 multigrid level 0 map 0 component 0\n0\t20 20 0\t0\t0 0 -10\t0\n0\t20 20 1\t0\t0 0 -9.5\t0.00627749118064621\n0\t20 20 2\t0\t0 0 -9\t0.0126835244855916\n0\t20 20 3\t0\t0 0 -8.5\t0.0193529409203634\n0\t20 20 4\t0\t0 0 -8\t0.0264338765905294\n0\t20 20 5\t0\t0 0 -7.5\t0.0340962886331973\n0\t20 20 6\t0\t0 0 -7\t0.0425431543385859\n0\t20 20 7\t0\t0 0 -6.5\t0.0520260743983623\n0\t20 20 8\t0\t0 0 -6\t0.0628680823469202\n0\t20 20 9\t0\t0 0 -5.5\t0.0754984404579252\n0\t20 20 10\t0\t0 0 -5\t0.0905079779887787\n0\t20 20 11\t0\t0 0 -4.5\t0.108741058509243\n0\t20 20 12\t0\t0 0 -4\t0.131456081896316\n0\t20 20 13\t0\t0 0 -3.5\t0.160621609428521\n0\t20 20 14\t0\t0 0 -3\t0.199498220158049\n0\t20 20 15\t0\t0 0 -2.5\t0.253863132564987\n0\t20 20 16\t0\t0 0 -2\t0.33477063910637\n0\t20 20 17\t0\t0 0 -1.5\t0.465128197230159\n0\t20 20 18\t0\t0 0 -1\t0.695600884062586\n0\t20 20 19\t0\t0 0 -0.5\t1.13959099905736\n0\t20 20 20\t0\t0 0 0\t1.26459099905636\n0\t20 20 21\t0\t0 0 0.5\t1.13959099905788\n0\t20 20 22\t0\t0 0 1\t0.695600884063601\n0\t20 20 23\t0\t0 0 1.5\t0.465128197231603\n0\t20 20 24\t0\t0 0 2\t0.334770639108177\n0\t20 20 25\t0\t0 0 2.5\t0.253863132567092\n0\t20 20 26\t0\t0 0 3\t0.199498220160383\n0\t20 20 27\t0\t0 0 3.5\t0.160621609431008\n0\t20 20 28\t0\t0 0 4\t0.131456081898876\n0\t20 20 29\t0\t0 0 4.5\t0.108741058511809\n0\t20 20 30\t0\t0 0 5\t0.0905079779913157\n0\t20 20 31\t0\t0 0 5.5\t0.0754984404604189\n0\t20 20 32\t0\t0 0 6\t0.062868082349347\n0\t20 20 33\t0\t0 0 6.5\t0.0520260744006689\n0\t20 20 34\t0\t0 0 7\t0.0425431543406953\n0\t20 20 35\t0\t0 0 7.5\t0.0340962886350324\n0\t20 20 36\t0\t0 0 8\t0.0264338765920384\n0\t20 20 37\t0\t0 0 8.5\t0.0193529409215264\n0\t20 20 38\t0\t0 0 9\t0.0126835244864046\n0\t20 20 39\t0\t0 0 9.5\t0.00627749118108585\n0\t20 20 40\t0\t0 0 10\t0\n\n",
"charge_tatelliptic_petsc/poisson-residual.norm_inf.asc": "# Scalar ASCII output created by CarpetIOScalar\n# created on redshift.pi.local by eschnett on Nov 25 2014 at 12:15:40-0500\n# parameter filename: \"/Users/eschnett/Cbeta/arrangements/CactusExamples/Poisson/test/charge_tatelliptic_petsc.par\"\n#\n# POISSON::res (poisson-residual)\n# 1:iteration 2:time 3:data\n# data columns: 3:res\n0 0 3.59539065186709e-11\n"
},
"doc": {
"documentation.tex": "% *======================================================================*\n% Cactus Thorn template for ThornGuide documentation\n% Author: Ian Kelley\n% Date: Sun Jun 02, 2002\n% $Header$\n%\n% Thorn documentation in the latex file doc/documentation.tex\n% will be included in ThornGuides built with the Cactus make system.\n% The scripts employed by the make system automatically include\n% pages about variables, parameters and scheduling parsed from the\n% relevant thorn CCL files.\n%\n% This template contains guidelines which help to assure that your\n% documentation will be correctly added to ThornGuides. More\n% information is available in the Cactus UsersGuide.\n%\n% Guidelines:\n% - Do not change anything before the line\n% % START CACTUS THORNGUIDE\",\n% except for filling in the title, author, date, etc. fields.\n% - Each of these fields should only be on ONE line.\n% - Author names should be separated with a \\\\ or a comma.\n% - You can define your own macros, but they must appear after\n% the START CACTUS THORNGUIDE line, and must not redefine standard\n% latex commands.\n% - To avoid name clashes with other thorns, 'labels', 'citations',\n% 'references', and 'image' names should conform to the following\n% convention:\n% ARRANGEMENT_THORN_LABEL\n% For example, an image wave.eps in the arrangement CactusWave and\n% thorn WaveToyC should be renamed to CactusWave_WaveToyC_wave.eps\n% - Graphics should only be included using the graphicx package.\n% More specifically, with the \"\\includegraphics\" command. Do\n% not specify any graphic file extensions in your .tex file. This\n% will allow us to create a PDF version of the ThornGuide\n% via pdflatex.\n% - References should be included with the latex \"\\bibitem\" command.\n% - Use \\begin{abstract}...\\end{abstract} instead of \\abstract{...}\n% - Do not use \\appendix, instead include any appendices you need as\n% standard sections.\n% - For the benefit of our Perl scripts, and for future extensions,\n% please use simple latex.\n%\n% *======================================================================*\n%\n% Example of including a graphic image:\n% \\begin{figure}[ht]\n% \t\\begin{center}\n% \t \\includegraphics[width=6cm]{MyArrangement_MyThorn_MyFigure}\n% \t\\end{center}\n% \t\\caption{Illustration of this and that}\n% \t\\label{MyArrangement_MyThorn_MyLabel}\n% \\end{figure}\n%\n% Example of using a label:\n% \\label{MyArrangement_MyThorn_MyLabel}\n%\n% Example of a citation:\n% \\cite{MyArrangement_MyThorn_Author99}\n%\n% Example of including a reference\n% \\bibitem{MyArrangement_MyThorn_Author99}\n% {J. Author, {\\em The Title of the Book, Journal, or periodical}, 1 (1999),\n% 1--16. {\\tt http://www.nowhere.com/}}\n%\n% *======================================================================*\n\n% If you are using CVS use this line to give version information\n% $Header$\n\n\\documentclass{article}\n\n% Use the Cactus ThornGuide style file\n% (Automatically used from Cactus distribution, if you have a\n% thorn without the Cactus Flesh download this from the Cactus\n% homepage at www.cactuscode.org)\n\\usepackage{../../../../doc/latex/cactus}\n\n\\begin{document}\n\n% The author of the documentation\n\\author{Erik Schnetter \\textless schnetter@gmail.com\\textgreater}\n\n% The title of the document (not necessarily the name of the Thorn)\n\\title{Poisson}\n\n% the date your document was last changed, if your document is in CVS,\n% please use:\n% \\date{$ $Date$ $}\n\\date{November 25, 2014}\n\n\\maketitle\n\n% Do not delete next line\n% START CACTUS THORNGUIDE\n\n% Add all definitions used in this documentation here\n% \\def\\mydef etc\n\n% Add an abstract for this thorn's documentation\n\\begin{abstract}\n This is an example thorn describing how to use the TATPETSc\n interface to PETSc. It solves the Poisson equation for a spherical\n charge distribution on a uniform grid.\n\\end{abstract}\n\n% The following sections are suggestive only.\n% Remove them or add your own.\n\n\\section{Introduction}\n\nPETSc is a well-known library for solving elliptic equations. TATPETSc\nis a Cactus thorn that provides a wrapper for calling PETSc to solve\nelliptic equations on uniform grids. (TATPETSc currently supports\nneither mesh refinement nor multi-block systems.) TATPETSc can solve\nboth linear and non-linear systems.\n\n\\section{Physical System}\n\nHere we solve the Poisson equation\n\\begin{eqnarray}\n \\Delta\\Phi(x) &=& \\rho(x)\n\\end{eqnarray}\nwhere the right hand side $\\rho$ is given by\n\\begin{eqnarray}\n \\rho(r) & = & \\left\\{\n \\begin{array}{ll}\n Q/V & r\\le R \\\\\n 0 & r>R\n \\end{array}\n \\right.\n\\end{eqnarray}\nfor the charge $Q$ and the radius $R$, with $V=4\\pi R^3/3$. We use\nDirichlet boundary conditions $\\Phi(x)=0$.\n\n\\section{Numerical Implementation}\n\nPETSc supports a large number of options to choose solvers. Here we\nuse PETSc's default settings.\n\n\\section{Using This Thorn}\n\nIn the example parameter file, we set the parameter\n\\texttt{TATPETSc::options} to select the following PETSc options:\n\\begin{itemize}\n\\item \\verb+-snes_atol 1e-8+: set absolute tolerance for residual\n\\item \\verb+-snes_stol 1e-8+: set relative tolerance for residual\n\\item \\verb+-snes_monitor+: output progress information at each\n iteration of the non-linear solver\n\\item \\verb+-ksp_monitor+: output progress information at each\n iteration of the linear (Krylov subspace) solver\n\\end{itemize}\n\n\\subsection{Examples}\n\nThe solution (the potential $\\Phi(x)$) is stored in the grid function\n\\texttt{potential}, the residual (a measure for the error) in the grid\nfunction \\texttt{residual}.\n\n% Do not delete next line\n% END CACTUS THORNGUIDE\n\n\\end{document}\n"
}
}