Logo Search packages:      
Sourcecode: zaptel version File versions

genconst.c

#define GEN_CONST
#include "mec-2.h"
#include <stdio.h>

int main()
{
      FILE *f;
      /* Initialize constants */
      ALPHA_ST = _ALPHA_ST;
      ALPHA_YT = _ALPHA_YT;
      SIGMA_LU = _SIGMA_LU;
      SIGMA_LY = _SIGMA_LY;
      DEFAULT_BETA1 = _DEFAULT_BETA1;
      MIN_BETA = _MIN_BETA;
      EC_MIN_VALUE = _EC_MIN_VALUE;
      CUTOFF = _CUTOFF;

      f = fopen("mec-2-const.h", "w");
      if (!f) {
            fprintf(stderr, "Unable to open const output\n");
            exit(1);
      }
      fprintf(f, "/* Generated by genconst */\n");
      fprintf(f, "#define ALPHA_ST %e\n", ALPHA_ST);
      fprintf(f, "#define ALPHA_YT %e\n", ALPHA_YT);
      fprintf(f, "#define SIGMA_LU %e\n", SIGMA_LU);
      fprintf(f, "#define SIGMA_LY %e\n", SIGMA_LY);
      fprintf(f, "#define DEFAULT_BETA1 %e\n", DEFAULT_BETA1);
      fprintf(f, "#define MIN_BETA %e\n", MIN_BETA);
      fprintf(f, "#define EC_MIN_VALUE %e\n", EC_MIN_VALUE);
      fprintf(f, "#define CUTOFF %e\n", CUTOFF);
      exit(0);

}

Generated by  Doxygen 1.6.0   Back to index