Exemple #1
0
int main(){
  /*Create the files to hold the abundances,dynamics, rates, and header info*/
  FILE *headFP=fopen("BinaryDataFiles/header.txt","w");
  FILE *abunFP=fopen("BinaryDataFiles/abundances.txt","w");
  FILE *dynaFP=fopen("BinaryDataFiles/dynamics.txt","w");
  FILE *rateFP=fopen("BinaryDataFiles/rates.txt","w");

  /* Decalare the critical variables as well as the expansion rate H*/
  double T9,h,phie,t;

  /*Create the arrays for abundances and abundance changes*/
  double Y[totalnnuc], dYdt[totalnnuc];

  /*Initialize all variables*/
  initializeAll(&T9,&h,&phie,&t,Y);
  printf("Initial dynamics: Ti=%3.2e\thi=%3.2e\tphiei=%3.2e\trhob0=%e\tti=%e\n\n",T9,h,phie,rhob0,t);
  fflush(stdout);
  
  /*Initialize calculation constants*/
  initializeConstants(deltaM,Z,Qvals,A,nni,nnj,nnk,nnl,reactionDetails);  

  /*Call the driver wrapper*/
  int bbn = driver(headFP,abunFP,dynaFP,rateFP,T9,h,phie,t,Y,dYdt);
  
  if(bbn!=-1)
    printf("Simulation complete\n");
  else{
    printf("Error: NAN\n");
    return -1;
  }
  fflush(stdout);  

  return 0;
}
Exemple #2
0
ASprite::ASprite(ATexture * bigDick)
{
	this->m_type=SPRITE_ENTITY;
	this->m_parent=NULL;
    bindTexture(bigDick);
    initializeAll();
}
Exemple #3
0
void ASprite::bindTexture(int textureId,int width,int height)
{
    initializeGLFunctions();
    m_texId = textureId;
    bindDefalutProgram();
    m_geometric.initParameter(width,height,
                  width,height,
                  0,0,
                  width,height);
    initializeAll();
}
Exemple #4
0
void ASprite::bindTexture(ATexture *fuckyou)
{
    initializeGLFunctions();
    m_texId = fuckyou->getTextureId();
    bindDefalutProgram();
    m_geometric.initParameter(fuckyou->width(),fuckyou->height(),
			      fuckyou->width(),fuckyou->height(),
			      0,0,
			      fuckyou->width(),fuckyou->height());
    initializeAll();
}
Exemple #5
0
void do_all_tests(void) {

	initializeAll();
	//various_tests();
	//winAtChess();
	//char *fen= "rnbq1rk1/pp3ppp/5n2/3p4/2pP4/P1B5/1P1NPPPP/R2QKB1R w KQ - 2 10";
	//char *fen="rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
    //char *fen="1k6/1p5p/6p1/1P2p1P1/4P3/5K2/5P2/2q5 w - - 4 49";
	char *fen="2kr4/7p/1pqb1Qp1/8/8/3R1pP1/P1r2P1P/5RK1 w - - 0 32";
	runOnePosition(fen);
	printf("all tests successfully completed\n");
}
Exemple #6
0
void AGeometric::initParameter(int width, int height, int imageWidth,int imageHeight, int x1, int y1, int x2, int y2)
{
    m_width = width;
    m_height = height;
    m_imageWidth = imageWidth;
    m_imageHeight = imageHeight;
    m_leftTopX = x1;
    m_leftTopY = y1;
    m_rightBottonX = x2;
    m_rightBottonY = y2;
    m_vboId = new GLuint[2];
    initializeAll();
    initRectGeometric();
}
Exemple #7
0
ASprite::ASprite()
{
	this->m_type=SPRITE_ENTITY;
	this->m_parent=NULL;
    initializeAll();
}
Exemple #8
0
ASpriteActor::ASpriteActor()
{
	this->m_type=SPRITE_ACTOR_ENTITY;
    initializeAll();
    this->m_parent=NULL;
}