/* * Ricciflowcode.h * * * Created by Christopher Herzog on 11/24/06. * Copyright 2006. All rights reserved. * */ #define NMAX_DEFAULT 10 /* The grid size */ #define WIDTH_DEFAULT 1.2 /* The grid width */ #define DEFAULT_OUT "garbage.txt" /* default output file */ #define DIFF_ERROR_RAW 1E-16 /* min average change of gridpoint per iteration */ #define MAX_LOOPS_DEFAULT 10 /* how many times steps to run */ #define MY_PRINT_DEFAULT 2 /* displays output every 2 iterations */ #define FLOW_PARAM_DEFAULT 0.1 /* controls Ricci flow time step size */ #define ROOT_ERROR 1E-10 /* root finding error */ /* global variable defining grid width */ int NMAX; /*global variable defining grid spacing */ double DELTA; /* controls speed of Ricci-flow */ double FLOW_PARAM; /* Updates the boundary conditions */ void boundaryupdate(double **tf); /* Updates the lattice */ double Fijupdate(double **tf, double **newfunct, double *oldshift); /* Interpolates values in the lattice for boundaryupdate() */ double planarinterp(double x, double y, double **tf); /* Computes Guillemin's trial potential */ double Fpottest(double xi, double eta); /* Functions converting grid position to xi and eta coordinates */ double xicoord(int i); double etacoord(int j); /* computes volume of space using Riemann sums*/ double volcomp(double **tf, double fshift); /* computes the value of hdot */ double discfunct(int i, int j, int flag, double **tf); /* calculates an error measure in satisfying hdot = 0 */ double calcdiscerror(double **tf, double oldshift); /* bicubic interpolation routines from numerical recipes */ void bcucof(double *y, double *y1, double *y2, double *y12, double d1, double d2, double **c); void bcuint(double *y, double *y1, double *y2, double *y12, double x1l, double x1u, double x2l, double x2u, double x1, double x2, double *ansy, double *ansy1, double *ansy2); void free_matrix(double **c, int imin, int imax, int jmin, int jmax); double **matrix(int imin, int imax, int jmin, int jmax);