/*
 * Copyright (C) 2022 NHR@FAU, University Erlangen-Nuremberg.
 * All rights reserved. This file is part of nusif-solver.
 * Use of this source code is governed by a MIT style
 * license that can be found in the LICENSE file.
 */
#ifndef __TRACE_H_
#define __TRACE_H_
#include "grid.h"
#include "parameter.h"

typedef enum COORD { X = 0, Y, NCOORD } COORD;
typedef enum { ADVANCE = 0, INJECT, WRITE, NUMTIMERS } TIMER;

typedef struct Tracing {
    double traceStart;
    double traceWrite;
    double traceInject;
    double dt;
    double lastUpdate[NUMTIMERS];
    double* memorypool;
    double* line;
    int cursor;
    int* particles;
    int numParticles;
    int totalParticles;
    Grid grid;
} Tracing;

extern void initTrace(Tracing* t, Parameter* p);
extern void trace(Tracing* t, double* u, double* v, double time);
#endif
