1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "cctk.h"
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
#include "CactusElliptic/EllBase/src/EllBase.h"
#include "CactusElliptic/EllBase/src/Ell_DBstructure.h"
static const char *rcsid = "$Header$";
CCTK_FILEVERSION(CactusElliptic_EllSOR_Startup_c)
void EllSOR_Register(CCTK_ARGUMENTS);
void SORConfMetric(cGH *GH,
int *MetricPsiI,
int FieldI,
int MI,
int NI,
CCTK_REAL *AbsTol,
CCTK_REAL *RelTol);
void SORFlat(cGH *GH,
int FieldI,
int MI,
int NI,
CCTK_REAL *AbsTol,
CCTK_REAL *RelTol);
/* routine registers the SOR solver "SORConfMetric" under the name "sor"
with the Elliptic Class "LinConfMetric".
*/
void EllSOR_Register(CCTK_ARGUMENTS)
{
DECLARE_CCTK_ARGUMENTS
DECLARE_CCTK_PARAMETERS
int err;
/* Register the solver with the elliptic classes */
err = Ell_RegisterSolver(SORConfMetric,"sor","Ell_LinConfMetric");
if (!err==ELL_SUCCESS)
{
CCTK_WARN(0,"EllSOR_Register: Failed to register sor for Ell_LinConfMetric");
}
err = Ell_RegisterSolver(SORFlat,"sor","Ell_LinFlat");
if (!err==ELL_SUCCESS)
{
CCTK_WARN(0,"EllSOR_Register: Failed to register sor for Ell_LinFlat");
}
/* These "keys" have to be same in other elliptic solver and in
the routines that sets them ! */
/* Register boundary SOR can handle */
err = Ell_CreateKey(CCTK_VARIABLE_STRING,"EllLinFlat::Bnd::Robin");
err = Ell_CreateKey(CCTK_VARIABLE_STRING,"EllLinFlat::Bnd::Const");
/* Create a key to be associated with the maximum number of iterations
allowed. */
err = Ell_CreateKey(CCTK_VARIABLE_INT, "Ell::SORmaxit");
if (err != ELL_SUCCESS)
{
CCTK_WARN(0, "EllSOR_Register: "
"Failed to create integer key Ell::SORmaxit");
}
/* Create a key to be associated with the type of acceleration to be
used. */
err = Ell_CreateKey(CCTK_VARIABLE_STRING, "Ell::SORaccel");
if (err != ELL_SUCCESS)
{
CCTK_WARN(0, "EllSOR_Register: "
"Failed to create integer key Ell::SORaccel");
}
}
|