Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /branches/lamont/test/implicit-surface/main_nogl.c
ViewVC logotype

View of /branches/lamont/test/implicit-surface/main_nogl.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2231 - (download) (as text) (annotate)
Fri Mar 1 22:56:47 2013 UTC (6 years, 11 months ago) by glk
File size: 715 byte(s)
GLK does not like trailing whitespace
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include "unit-circle.h"


void GetData (CIRCLE_World_t *wrld, Nrrd *nData)
{
  // get snapshot of state
    if (CIRCLE_Snapshot_outPos(wrld, nData)) {
      // error
        fprintf(stderr, "Error getting nrrd data\n");
        exit(1);
    }
}
int main(int argc, char** argv)
{

    // initialize the Diderot program
    CIRCLE_World_t * wrld;
    Nrrd *nData;
    wrld = CIRCLE_Init();
    nData = nrrdNew();
    CIRCLE_Initially (wrld);
    int NumSteps = 0;

    while (CIRCLE_NumActive(wrld) > 0) {
        // step the computation
        CIRCLE_Run(wrld, 1);

        // get and render the state
        GetData (wrld, nData);
     }

    return 0;
}

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0