//#####################################################################
// Copyright 2009-2010, Michael Lentine, Andrew Selle.
// This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt.
//#####################################################################
#ifndef __SMOKE_DRIVER__
#define __SMOKE_DRIVER__
#include <Core/Vectors/VECTOR.h>
namespace PhysBAM{


template<class TV> class SMOKE_EXAMPLE;

template<class TV>
class SMOKE_DRIVER
{
    typedef typename TV::SCALAR T;
    typedef VECTOR<int,TV::m> IV;
 
protected:
    int current_frame;
    T time;
    int output_number;
    int ghost;

    SMOKE_EXAMPLE<TV>& example;
public:
    SMOKE_DRIVER(SMOKE_EXAMPLE<TV>& example);
    virtual ~SMOKE_DRIVER();

    void Add_Buoyancy_Force(const T dt,const T time);
    void Scalar_Advance(const T dt,const T time);
    void Convect(const T dt,const T time);
    void Add_Forces(const T dt,const T time);
    void Project(const T dt,const T time);
    void Execute_Main_Program();
    void Initialize();
    void Advance_To_Target_Time(const T target_time);
    void Simulate_To_Frame(const int frame_input);
    void Print_Max_Divergence(const char* str);
//#####################################################################
};
}
#endif
