Peano 4
Loading...
Searching...
No Matches
CollocatedPoisson.cpp
Go to the documentation of this file.
1
#include "CollocatedPoisson.h"
2
3
4
benchmarks::multigrid::petsc::poisson::CollocatedPoisson::CollocatedPoisson() {
5
// @todo add your stuff here
6
}
7
8
9
benchmarks::multigrid::petsc::poisson::CollocatedPoisson::~CollocatedPoisson() {
10
// @todo add your stuff here
11
}
12
13
14
void
benchmarks::multigrid::petsc::poisson::CollocatedPoisson::vertexInit(
15
const
tarch::la::Vector<Dimensions, double>
& x,
16
const
tarch::la::Vector<Dimensions, double>
&
h
,
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
h
@ h
Definition
SaintVenantKernels.h:26
makeIC.i
int i
Definition
makeIC.py:51
petscReader.rhs
rhs
Definition
petscReader.py:99
tarch::la::PI
constexpr double PI
Definition
Scalar.h:12
tarch::la::Vector
Simple vector class.
Definition
Vector.h:134
benchmarks
multigrid
petsc
poisson
CollocatedPoisson.cpp
Generated on Fri Mar 15 2024 10:19:49 for Peano 4 by
1.10.0