aboutsummaryrefslogtreecommitdiff
path: root/src/Startup.c
blob: 84c8b9cd64d12515406290e25c74451fa9bb5db7 (plain)
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
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "cctk.h"
#include "cctk_Parameters.h"

static const char *rcsid = "$Header$";

CCTK_FILEVERSION(CactusElliptic_EllPETSc_Startup_c)

/* Registration of the petsc solvers with the Elliptic solver registry.
   This routine registers petsc_confmetric under the name "petsc" for 
   the class of elliptic equations "LinConfMetric" */
   
int EllPETSc_Register(cGH *GH) 
{
  void petsc_confmetric(cGH *GH, int *MetricPsiI, int *FieldI, int *MI,
			int *NI, int *AbsTol, int *RelTol);
  
  void petsc_metric(cGH *GH, int *MetricI, int *FieldI, int *MI,
		    int *NI, int *AbsTol, int *RelTol);

  void petsc_flat(cGH *GH, int *FieldIndex, int *MIndex, int *NIndex, 
			 int *AbsTol, int *RelTol);
  DECLARE_CCTK_PARAMETERS 
  
  if (CCTK_Equals(elliptic_verbose,"yes"))
  {
      printf("PETSc: Registering petsc for Ell_LinConfMetric...\n");
  }
  Ell_RegisterSolver(petsc_confmetric,"petsc","Ell_LinConfMetric");

  if (CCTK_Equals(elliptic_verbose,"yes"))
  {
    printf("PETSc: Registering petsc for Ell_LinMetric...\n");
  }
  Ell_RegisterSolver(petsc_metric,"petsc","Ell_LinMetric");

  if (CCTK_Equals(elliptic_verbose,"yes"))
  {
    printf("PETSc: Registering petsc for Ell_LinFlat...\n");
  }
  Ell_RegisterSolver(petsc_flat,"petsc","Ell_LinFlat");

  return 0;
}