diff options
-rw-r--r-- | src/Boundary.c | 3 | ||||
-rw-r--r-- | src/Boundary.h | 34 | ||||
-rw-r--r-- | src/Register.c | 21 |
3 files changed, 34 insertions, 24 deletions
diff --git a/src/Boundary.c b/src/Boundary.c index b4724c8..f190d19 100644 --- a/src/Boundary.c +++ b/src/Boundary.c @@ -29,9 +29,6 @@ CCTK_FILEVERSION(CactusBase_Boundary_Boundary_c); ********************************************************************/ /* #define DEBUG 1 */ -/* pointer to function which implements a physical boundary condition: */ -typedef int (*phys_bc_fn_ptr)(const cGH *, int, int *, int *, int *); - /* Linked list for holding variables selected for a bc: * Entries are sorted in the order they appear in struct BCVAR, * i.e. the var_index varies most rapidly, and bc_name least rapidly. diff --git a/src/Boundary.h b/src/Boundary.h index d39438f..84ea879 100644 --- a/src/Boundary.h +++ b/src/Boundary.h @@ -17,15 +17,21 @@ extern "C" { #endif +/* data type for pointer to function which implements a physical boundary + condition: */ +typedef CCTK_INT (*phys_bc_fn_ptr)(CCTK_POINTER, CCTK_INT, CCTK_INT *, CCTK_INT *, + CCTK_INT *); + + /* prototype for routine registed as providing 'None' boundary condition */ -int BndNone(const cGH *GH, int num_vars, int *var_indicies, int *faces, - int *table_handle); +CCTK_INT BndNone(const cGH *GH, CCTK_INT num_vars, CCTK_INT *var_indicies, + CCTK_INT *faces, CCTK_INT *table_handle); /* Scalar boundaries */ /* prototype for routine registed as providing 'Scalar' boundary condition */ -int BndScalar(const cGH *GH, int num_vars, int *var_indicies, int *faces, - int *table_handle); +CCTK_INT BndScalar(const cGH *GH, CCTK_INT num_vars, CCTK_INT *var_indicies, + CCTK_INT *faces, CCTK_INT *table_handle); int BndScalarDirGI (const cGH *GH, int stencil_size, @@ -69,8 +75,8 @@ int BndScalarVN (const cGH *GH, /* Copying boundaries */ /* prototype for routine registed as providing 'Copy' boundary condition */ -int BndCopy(const cGH *GH, int num_vars, int *var_indicies, int *faces, - int *table_handle); +CCTK_INT BndCopy(const cGH *GH, CCTK_INT num_vars, CCTK_INT *var_indicies, + CCTK_INT *faces, CCTK_INT *table_handle); int BndCopyDirGI (const cGH *GH, int stencil_size, @@ -113,8 +119,8 @@ int BndCopyVN (const cGH *GH, /* Static boundaries */ /* prototype for routine registed as providing 'Static' boundary condition */ -int BndStatic(const cGH *GH, int num_vars, int *var_indicies, int *faces, - int *table_handle); +CCTK_INT BndStatic(const cGH *GH, CCTK_INT num_vars, CCTK_INT *var_indicies, + CCTK_INT *faces, CCTK_INT *table_handle); int BndStaticDirGI (const cGH *GH, int stencil_size, @@ -150,8 +156,8 @@ int BndStaticVN (const cGH *GH, /* Radiative boundaries */ /* prototype for routine registed as providing 'Radiative' boundary conditions */ -int BndRadiative(const cGH *GH, int num_vars, int *var_indicies, int *faces, - int *table_handle); +CCTK_INT BndRadiative(const cGH *GH, CCTK_INT num_vars, CCTK_INT *var_indicies, + CCTK_INT *faces, CCTK_INT *table_handle); int BndRadiativeDirGI (const cGH *GH, int stencil_size, @@ -211,8 +217,8 @@ int BndRadiativeVN (const cGH *GH, /* Robin boundaries */ /* prototype for routine registed as providing 'Robin' boundary condition */ -int BndRobin(const cGH *GH, int num_vars, int *var_indicies, int *faces, - int *table_handle); +CCTK_INT BndRobin(const cGH *GH, CCTK_INT num_vars, CCTK_INT *var_indicies, + CCTK_INT *faces, CCTK_INT *table_handle); int BndRobinGI (const cGH *GH, const int *stencil, @@ -239,8 +245,8 @@ int BndRobinVN (const cGH *GH, /* Flat boundaries */ /* prototype for routine registed as providing 'Flat' boundary condition */ -int BndFlat(const cGH *GH, int num_vars, int *var_indicies, int *faces, - int *table_handle); +CCTK_INT BndFlat(const cGH *GH, CCTK_INT num_vars, CCTK_INT *var_indicies, + CCTK_INT *faces, int *table_handle); int BndFlatDirGI (const cGH *GH, int stencil_size, diff --git a/src/Register.c b/src/Register.c index bfea5c1..c4dd4f1 100644 --- a/src/Register.c +++ b/src/Register.c @@ -76,7 +76,8 @@ void Boundary_RegisterBCs(CCTK_ARGUMENTS) { if (register_scalar) { - err = Boundary_RegisterPhysicalBC(cctkGH, (CCTK_FPOINTER) &BndScalar, + err = Boundary_RegisterPhysicalBC((CCTK_POINTER) cctkGH, + (phys_bc_fn_ptr) &BndScalar, "Scalar"); if (err) { @@ -88,7 +89,8 @@ void Boundary_RegisterBCs(CCTK_ARGUMENTS) { if (register_flat) { - err = Boundary_RegisterPhysicalBC(cctkGH, (CCTK_FPOINTER) &BndFlat, + err = Boundary_RegisterPhysicalBC((CCTK_POINTER) cctkGH, + (phys_bc_fn_ptr) &BndFlat, "Flat"); if (err) { @@ -100,7 +102,8 @@ void Boundary_RegisterBCs(CCTK_ARGUMENTS) { if (register_radiation) { - err = Boundary_RegisterPhysicalBC(cctkGH, (CCTK_FPOINTER) &BndRadiative, + err = Boundary_RegisterPhysicalBC((CCTK_POINTER) cctkGH, + (phys_bc_fn_ptr) &BndRadiative, "Radiation"); if (err) { @@ -112,7 +115,8 @@ void Boundary_RegisterBCs(CCTK_ARGUMENTS) { if (register_copy) { - err = Boundary_RegisterPhysicalBC(cctkGH, (CCTK_FPOINTER) &BndCopy, + err = Boundary_RegisterPhysicalBC((CCTK_POINTER) cctkGH, + (phys_bc_fn_ptr) &BndCopy, "Copy"); if (err) { @@ -124,7 +128,8 @@ void Boundary_RegisterBCs(CCTK_ARGUMENTS) { if (register_robin) { - err = Boundary_RegisterPhysicalBC(cctkGH, (CCTK_FPOINTER) &BndRobin, + err = Boundary_RegisterPhysicalBC((CCTK_POINTER) cctkGH, + (phys_bc_fn_ptr) &BndRobin, "Robin"); if (err) { @@ -136,7 +141,8 @@ void Boundary_RegisterBCs(CCTK_ARGUMENTS) { if (register_static) { - err = Boundary_RegisterPhysicalBC(cctkGH, (CCTK_FPOINTER) &BndStatic, + err = Boundary_RegisterPhysicalBC((CCTK_POINTER) cctkGH, + (phys_bc_fn_ptr) &BndStatic, "Static"); if (err) { @@ -148,7 +154,8 @@ void Boundary_RegisterBCs(CCTK_ARGUMENTS) { if (register_none) { - err = Boundary_RegisterPhysicalBC(cctkGH, (CCTK_FPOINTER) &BndNone, + err = Boundary_RegisterPhysicalBC((CCTK_POINTER) cctkGH, + (phys_bc_fn_ptr) &BndNone, "None"); if (err) { |