NSIntegrator.cpp 970 Bytes
Newer Older
Christopher Subich's avatar
Christopher Subich committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "NSIntegrator.hpp"
#include "BaseCase.hpp"

/* And default global values for filtering */
double f_cutoff = 0.6, f_order = 2, f_strength = 20;

// Hack -- if a density tracer is really a perturbation density, it should
// have zero boundary conditions on a cosine/free-slip grid.  Otherwise,
// the zero-derivative BC is more appropriate.  Short of changing the function
// interface to specify this per-tracer, use a single global boolean
bool zero_tracer_boundary = false; 

namespace NSIntegrator{ 
   S_EXP get_trans_type(DIMTYPE dtype, Sym stype) {
      switch (dtype) {
         case PERIODIC:
            return FOURIER;
         case FREE_SLIP:
            if (stype == EVEN) return COSINE;
            if (stype == ODD) return SINE;
            abort(); break;
         case NO_SLIP:
            return CHEBY;
         default:
            abort(); return NONE;
      }
   }
}

template class FluidEvolve<BaseCase>; // Explicit template instantiation