Peano 4
Loading...
Searching...
No Matches
solutionAdjustment.cpph
Go to the documentation of this file.
1
13template <typename SolverType>
15 SolverType& solver,
16 double* luh, const tarch::la::Vector<Dimensions, double>& center,
17 const tarch::la::Vector<Dimensions, double>& dx, const double t,
18 const double dt) {
19 constexpr int numberOfVariables = SolverType::NumberOfVariables;
20 constexpr int numberOfParameters = SolverType::NumberOfParameters;
21 constexpr int numberOfData = numberOfVariables+numberOfParameters;
22 constexpr int order = SolverType::Order;
23 constexpr int basisSize = order+1;
24
25 idx3 idx_luh(basisSize, basisSize, numberOfData);
26
27 double x[2];
28 for (int i = 0; i < basisSize; i++) { // loop over dof (Major)
29 //#if defined(_GLL)
30 //const double qi = kernels::gaussLobattoNodes[order][basisSize-1-i];
31 //#else
32 //const double qi = kernels::gaussLegendreNodes[order][i];
33 //#endif
34 const double qi = SolverType::nodes[order][i];
35
36 for (int j = 0; j < basisSize; j++) { // (Minor)
37 //#if defined(_GLL)
38 //const double qj = kernels::gaussLobattoNodes[order][basisSize-1-j];
39 //#else
40 //const double qj = kernels::gaussLegendreNodes[order][j];
41 //#endif
42 const double qj = SolverType::nodes[order][j];
43
44 x[0] = center[0] + dx[0] * (qj - 0.5);
45 x[1] = center[1] + dx[1] * (qi - 0.5);
46
47 solver.adjustPointSolution(x, t, dt, luh + idx_luh(i,j,0));
48 }
49 }
50}
And from this we can write down f$ nabla phi_i nabla phi_i dx but since we are constructing matrix let s investigate the f$ j
we integrate over each cell and then take the sum across each of the cells We also consider the terms that enter the f$ so we are integrating with f$ phi_k phi_k dx
void solutionAdjustment(SolverType &solver, double *luh, const tarch::la::Vector< Dimensions, double > &center, const tarch::la::Vector< Dimensions, double > &dx, const double t, const double dt)
This file is part of the ExaHyPE project.
Simple vector class.
Definition Vector.h:134