diff options
Diffstat (limited to 'src/Cartoon2DBC.c')
-rw-r--r-- | src/Cartoon2DBC.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/Cartoon2DBC.c b/src/Cartoon2DBC.c new file mode 100644 index 0000000..f1e1ebf --- /dev/null +++ b/src/Cartoon2DBC.c @@ -0,0 +1,49 @@ +/*@@ + @file Cartoon2DBC.c + @date Thu Nov 4 13:35:00 MET 1999 + @author Sai Iyer + @desc + Apply Cartoon2D boundary conditions + Adapted from Bernd Bruegmann's cartoon_2d_tensorbound.c + and set_bound_axisym.c + @enddesc + @@*/ + +static char *rcsid = "$Id$" + +#include "cctk.h" +#include "cctk_arguments.h" +#include "cctk_parameters.h" + +#include "cartoon2D.h" + +int Cartoon2DBCVarI(cGH *GH, int vi, int tensortype) { + DECLARE_CCTK_PARAMETERS + + static int firstcall = 1, pr = 0; + + if (firstcall) { + firstcall = 0; + pr = CCTK_Equals(verbose, "yes"); + } + if (pr) printf("cartoon_2d_tensorbound called for %s\n", name); + + return(SetBoundAxisym(GH, vi, tensortype)); +} + +void FMODIFIER FORTRAN_NAME(Cartoon2DBCVarI)(int *retval, cGH *GH, int *vi, int *tensortype) { + *retval = Cartoon2DBCVarI(GH, *vi, *tensortype); +} + +int Cartoon2DBCVar(cGH *GH, const char *impvarname, int tensortype) +{ + int vi; + vi = CCTK_VarIndex(impvarname); + return(Cartoon2DBCVarI(GH, vi, tensortype)); +} + +void FMODIFIER FORTRAN_NAME(Cartoon2DBCVar)(int *retval, cGH *GH, ONE_FORTSTRING_ARG, int *tensortype) { + ONE_FORTSTRING_CREATE(impvarname) + *retval = Cartoon2DBCVar(GH, impvarname, *tensortype); + free(impvarname); +} |