source: src/samples/discretization_poisson_fd.hpp@ ac6d04

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

Merge recent changes of the vmg library into ScaFaCos.

Includes a fix for the communication problems on Jugene.

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

  • Property mode set to 100644
File size: 1.0 KB
Line 
1/**
2 * @file discretization_poisson_fd.hpp
3 * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
4 * @date Mon Apr 18 13:01:40 2011
5 *
6 * @brief Finite difference discretization of the
7 * Poisson equation.
8 *
9 */
10
11#ifndef DISCRETIZATION_POISSON_FD_HPP_
12#define DISCRETIZATION_POISSON_FD_HPP_
13
14#include "base/discretization.hpp"
15#include "base/helper.hpp"
16
17namespace VMG
18{
19
20class DiscretizationPoissonFD : public Discretization
21{
22public:
23 DiscretizationPoissonFD()
24 {
25 stencil.SetDiag(6.0);
26 stencil.push_back(-1, 0, 0, -1.0);
27 stencil.push_back( 1, 0, 0, -1.0);
28 stencil.push_back( 0, -1, 0, -1.0);
29 stencil.push_back( 0, 1, 0, -1.0);
30 stencil.push_back( 0, 0, -1, -1.0);
31 stencil.push_back( 0, 0, 1, -1.0);
32 }
33
34 vmg_float OperatorPrefactor(const Grid& grid) const
35 {
36 return 1.0 / Helper::pow_2(grid.Extent().MeshWidth().Max());
37 }
38
39private:
40 void SetInnerBoundaryCompute(Grid& sol_fine, Grid& rhs_fine, Grid& sol_coarse) const {}
41};
42
43}
44
45#endif /* DISCRETIZATION_POISSON_FD_HPP_ */
Note: See TracBrowser for help on using the repository browser.