Peano 4
Loading...
Searching...
No Matches
CollocatedPoisson.cpp
Go to the documentation of this file.
1#include "CollocatedPoisson.h"
2
3
4benchmarks::multigrid::petsc::poisson::CollocatedPoisson::CollocatedPoisson() {
5 // @todo add your stuff here
6}
7
8
9benchmarks::multigrid::petsc::poisson::CollocatedPoisson::~CollocatedPoisson() {
10 // @todo add your stuff here
11}
12
13
14void benchmarks::multigrid::petsc::poisson::CollocatedPoisson::vertexInit(
17
18 double& value,
19 double& rhs
20
21) {
22 //divide by 2 to achieve correct scaling
23 rhs = Dimensions * tarch::la::PI * tarch::la::PI / 2;
24 for (int i = 0; i < Dimensions; i++){
25
26 //we add scaling by cell width here
27 rhs *= std::sin( tarch::la::PI * x[i] ) * h[i];
28 }
29 value = 0.0;
30}
31
32
int i
Definition makeIC.py:51
constexpr double PI
Definition Scalar.h:12
Simple vector class.
Definition Vector.h:134