Commit c6e542fd 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!
(Previous commit added the wrong file)
parent 79285eb8
#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
Subproject commit 46a171712cc0abe7606d9be6ff47551097d3359f
Subproject commit 40b5c08075fbf49ad704706dd24360688e96b6a6
Subproject commit 724205cb0e2005399159ae23d880819f2fc2380f
Subproject commit 9b7bbb95c86939d679494db5560f4b35b7aaa1c8
......@@ -30,9 +30,9 @@ class {{project}}::{{solver}}: public exahype::solvers::LimitingADERDGSolver {
static constexpr int GhostLayerWidth = {{project}}::{{FVAbstractSolver}}::GhostLayerWidth;
// limiter projection matrices
double dg2fv[(Order+1)*PatchSize];
double fv2dg[(Order+1)*PatchSize];
double leg2lob[(Order+1)*(Order+1)];
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};
{{solver}}(
const double maximumMeshSize,
......
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