Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Pondelok, 26. október 2026

Rozdiely pre dead/diplomovka/xpdp/src/start.c medzi verziami 1.1.1.1 a 1.1.1.1.2.1

verzia 1.1.1.1, 2001/09/20 14:12:01 verzia 1.1.1.1.2.1, 2002/09/13 18:38:34
Riadok 1 
Riadok 1 
   #include <stdio.h>
 #include <malloc.h>  #include <malloc.h>
   #include <errno.h>
   #include <string.h>
   
 #include "pdp1.h"  #include "pdp1.h"
 #include "xgrafix.h"  #include "xgrafix.h"
   
Riadok 20  void start(void)
Riadok 24  void start(void)
         // Open files and read in "general" parameters {{{          // Open files and read in "general" parameters {{{
   
         if (!WasInputFileGiven) {          if (!WasInputFileGiven) {
                 puts("Syntax:");                  PrintUsage(NULL);
                 puts("\tPDP1 <inputdeck> [dumpfile]");                  // puts("Syntax:");
                   // puts("\tPDP1 <inputdeck> [dumpfile]");
                 exit(1);                  exit(1);
         }          }
         InputDeck = fopen(theInputFile, "r");          if ((InputDeck = fopen(theInputFile, "r")) == NULL) {
                   fprintf(stderr, "Can't open input file '%s': %s \n",
                                   theInputFile, strerror(errno));
           }
   
         // }}}          // }}}
   
         // Read lines until we get to numbers {{{          // Read lines until we get to numbers {{{
Riadok 159  void start(void)
Riadok 168  void start(void)
         phi = (float *)malloc(ng*sizeof(float));          phi = (float *)malloc(ng*sizeof(float));
         e   = (float *)malloc(ng*sizeof(float));          e   = (float *)malloc(ng*sizeof(float));
         chi = (float *)malloc(ng*sizeof(float));          chi = (float *)malloc(ng*sizeof(float));
         for (j=0; j<ng; j++) chi[j] = e[j] = phi[j] = 0.0;          n1_delta = (float *)malloc(ng*sizeof(float));
           n2_delta = (float *)malloc(ng*sizeof(float));
           for (j=0; j<ng; j++)
                   chi[j] = e[j] = phi[j] = n1_delta[j] = n2_delta[j] = 0.0;
         // }}}          // }}}
   
         //*** Allocate Dianostic arrays  ****** {{{          //*** Allocate Dianostic arrays  ****** {{{
Riadok 427  void start(void)
Riadok 439  void start(void)
         // the number "num", yielding a fraction between 0 and 1.          // the number "num", yielding a fraction between 0 and 1.
         // Index[] is also used in padjus.c.          // Index[] is also used in padjus.c.
   
         for (i=0; i<1024; i++) Index[i] = 1024*revers(i);          for (i = 0; i < 1024; i++)
                   Index[i] = 1024 * revers(i);
   
         //*******************************************************          //*******************************************************
         // Load in all species' particles, properly distributed.          // Load in all species' particles, properly distributed.

Legend:
Odstranené z verzie1.1.1.1  
zmenené riadky
  Pridané vo verzii1.1.1.1.2.1

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok