Commit 79285eb8 authored by Philipp Samfass's avatar Philipp Samfass
Browse files

fixed a severe bug when using the limiter plus generic kernels: dg2fv...

fixed a severe bug when using the limiter plus generic kernels: dg2fv projector array needs to be initialized with zero!
parent e538e3d5
#ifndef __MySWESolver_CLASS_HEADER__
#define __MySWESolver_CLASS_HEADER__
// This file is generated by the ExaHyPE toolkit.
// Please do not modify - it will be overwritten by the next
// ExaHyPE toolkit call.
//
// ========================
// www.exahype.eu
// ========================
#include <string>
#include "exahype/solvers/LimitingADERDGSolver.h"
#include "MySWESolver_ADERDG.h"
#include "MySWESolver_FV.h"
namespace SWE{
class MySWESolver;
}
class SWE::MySWESolver: public exahype::solvers::LimitingADERDGSolver {
public:
static constexpr int NumberOfVariables = SWE::AbstractMySWESolver_ADERDG::NumberOfVariables;
static constexpr int NumberOfParameters = SWE::AbstractMySWESolver_ADERDG::NumberOfParameters;
static constexpr int Order = SWE::AbstractMySWESolver_ADERDG::Order;
static constexpr int NumberOfGlobalObservables = SWE::AbstractMySWESolver_ADERDG::NumberOfGlobalObservables;
static constexpr int NumberOfDMPObservables = SWE::AbstractMySWESolver_ADERDG::NumberOfDMPObservables;
static constexpr int PatchSize = SWE::AbstractMySWESolver_FV::PatchSize;
static constexpr int GhostLayerWidth = SWE::AbstractMySWESolver_FV::GhostLayerWidth;
// limiter projection matrices
double dg2fv[(Order+1)*PatchSize] = {0}; //dg2fv is directly overwritten in generic kernels -> needs to be initialized with zero!
double fv2dg[(Order+1)*PatchSize] = {0};
double leg2lob[(Order+1)*(Order+1)] = {0};
MySWESolver(
const double maximumMeshSize,
const int maximumMeshDepth,
const int haloCells,
const int haloBufferCells,
const int limiterBufferCells,
const int regularisedFineGridLevels,
const exahype::solvers::Solver::TimeStepping timeStepping,
const int DMPObservables,
const double DMPRelaxationParameter,
const double DMPDifferenceScaling
);
void projectOnFVLimiterSpace(const double* const luh, double* const lim) const override;
void projectOnDGSpace(const double* const lim, double* const luh) const override;
bool discreteMaximumPrincipleAndMinAndMaxSearch(const double* const luh, double* const boundaryMinPerVariables, double* const boundaryMaxPerVariables) override;
void findCellLocalMinAndMax(const double* const luh, double* const localMinPerVariables, double* const localMaxPerVariable) override;
void findCellLocalLimiterMinAndMax(const double* const lim, double* const localMinPerObservable, double* const localMaxPerObservable) override;
};
#endif // __MySWESolver_CLASS_HEADER__
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment