source: src/base/stencil.cpp@ facba0

Last change on this file since facba0 was dfed1c, checked in by Julian Iseringhausen <isering@…>, 14 years ago

Major vmg update.

git-svn-id: https://svn.version.fz-juelich.de/scafacos/trunk@1136 5161e1c8-67bf-11de-9fd5-51895aff932f

  • Property mode set to 100644
File size: 556 bytes
Line 
1/**
2 * @file stencil.cpp
3 * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
4 * @date Mon Apr 18 12:24:43 2011
5 *
6 * @brief VMG::Stencil.
7 *
8 */
9
10
11#ifdef HAVE_CONFIG_H
12#include <config.h>
13#endif
14
15#include "base/stencil.hpp"
16#include "grid/grid.hpp"
17
18using namespace VMG;
19
20vmg_float Stencil::Apply(const Grid& grid, const Index& index) const
21{
22 vmg_float result = diag * grid.GetVal(index);
23
24 for (Stencil::iterator iter=disp.begin(); iter!=disp.end(); ++iter)
25 result += iter->Val() * grid.GetVal(index + iter->Disp());
26
27 return result;
28}
Note: See TracBrowser for help on using the repository browser.