// powerlaw.h

#ifndef POWERLAW_H
#define POWERLAW_H

#include <iostream>
#include <cstring>
#include <fstream>
#include <cassert>
using namespace std;

class PowerLaw
{
public:
  // constructors 
  PowerLaw();

  PowerLaw( float store, float coef, float exp );

  // destructor 
  //~PowerLaw();

  // funtions 
  void get_parameters( float store, float coef, float exp );     // make virtual
  float output( float InputVol, float Dt );             // make virtual
  float get_storage() { return Storage; }

protected:
  float Storage, Coeff, Exponent;
  float CalcAnalytical( float Influx, float k, float Dt );
  float CalcDerivative( float Influx, float NewStore );
  float ODEsolver( float InFlux, float Storage, float Dt );
};

#endif


