#include <vector>
#include <cassert>
#include "Stencil.h"
Functions | |
void | stencil1 (vector< double > &f, int index, unsigned int n, double invSq, const vector< vector< double > > &S, const vector< double > &diffConst) |
void | stencilN (vector< double > &f, int index, unsigned int n, int offset, double invSq, const vector< vector< double > > &S, const vector< double > &diffConst) |
void stencil1 | ( | vector< double > & | f, | |
int | index, | |||
unsigned int | n, | |||
double | invSq, | |||
const vector< vector< double > > & | S, | |||
const vector< double > & | diffConst | |||
) |
void stencilN | ( | vector< double > & | f, | |
int | index, | |||
unsigned int | n, | |||
int | offset, | |||
double | invSq, | |||
const vector< vector< double > > & | S, | |||
const vector< double > & | diffConst | |||
) |
f is the flux vector, returned to caller index is the meshIndex being computed n is the number of mesh entries in this stencil. It is nx for the x axis and nx*ny for the y axis. offset is the stencil displacement: 1 for the x axis, nx for the y axis, doesn't apply for the z axis as that will be done using stencil1. invSq is 1/dx for the x axis, 1/dy for the y axis, and so on. S is the matrix of [meshEntries][pools] diffConst is the vector of [pools]