Commit ad5512ed authored by Anne Reinarz's avatar Anne Reinarz

new writer with gradients

parent 7a642572
#include "ConstraintsWriter.h"
#include "kernels/GaussLegendreBasis.h"
#include "kernels/KernelUtils.h"
// This file was generated by the ExaHyPE toolkit.
// It will not be overwritten.
//
//
// ========================
// www.exahype.eu
// ========================
#include "PDE.h" // ADMConstraints()
#include "AbstractFOCCZ4Solver_ADERDG.h"
#include "kernels/aderdg/generic/c/computeGradients.cpph"
#include "kernels/GaussLegendreBasis.h"
#include "tarch/logging/Log.h"
static tarch::logging::Log _log("FOCCZ4::ConstraintsWriter::");
FOCCZ4::ConstraintsWriter::ConstraintsWriter(exahype::solvers::LimitingADERDGSolver& solver) {
// @todo Please insert your code here
}
FOCCZ4::ConstraintsWriter::ConstraintsWriter(FOCCZ4Solver_FV& solver) {
// @todo Please insert your code here
}
#include "ConstraintsWriter.h"
FOCCZ4::ConstraintsWriter::ConstraintsWriter(FOCCZ4Solver_ADERDG& solver) {
// @todo Please insert your code here
FOCCZ4::ConstraintsWriter::ConstraintsWriter(FOCCZ4::FOCCZ4Solver& solver) {
// @TODO Please insert your code here.
}
FOCCZ4::ConstraintsWriter::~ConstraintsWriter() {
// @todo Please insert your code here
}
void FOCCZ4::ConstraintsWriter::startPlotting(double time) {
// @todo Please insert your code here
timeLastWarned = -1;
void FOCCZ4::ConstraintsWriter::startPlotting( double time) {
// @TODO Please insert your code here.
}
void FOCCZ4::ConstraintsWriter::finishPlotting() {
// @todo Please insert your code here
}
bool FOCCZ4::ConstraintsWriter::mapWithDerivatives() {
return true;
// @TODO Please insert your code here.
}
void FOCCZ4::ConstraintsWriter::mapQuantities(
......@@ -63,29 +46,3 @@ void FOCCZ4::ConstraintsWriter::mapQuantities(
for(int i=0; i<6; i++) { if(outputQuantities[i]!=outputQuantities[i]) std::abort(); }
}
void FOCCZ4::ConstraintsWriter::mapQuantities(
const tarch::la::Vector<DIMENSIONS, double>& offsetOfPatch,
const tarch::la::Vector<DIMENSIONS, double>& sizeOfPatch,
const tarch::la::Vector<DIMENSIONS, double>& x,
const tarch::la::Vector<DIMENSIONS, int>& pos,
double* Q,
double* outputQuantities,
double timeStamp) {
// this should be a UserOnTheFlyPostProcessing constant,
// allowing to ensure we write out 6 unknowns.
static constexpr int writtenUnknowns = 6;
//for(int i=0; i<59; i++) { if(Q[i]!=Q[i]) std::abort(); }
double gradQ[basisSize3 * DIMENSIONS * numberOfVariables];
//kernels::aderdg::generic::c::computeGradQ<FOCCZ4::AbstractFOCCZ4Solver_ADERDG>(gradQ, Q, sizeOfPatch);
admconstraints_(outputQuantities, Q, gradQ);
for(int i=0; i<6; i++) { if(outputQuantities[i]!=outputQuantities[i]) std::abort(); }
}
// This file is generated by the ExaHyPE toolkit.
// Please do not modify - it will be overwritten by the next
// ExaHyPE toolkit call.
//
// This file was generated by the ExaHyPE toolkit.
// It will not be overwritten.
//
// ========================
// www.exahype.eu
// ========================
#include "exahype/plotters/Plotter.h"
#include "exahype/solvers/LimitingADERDGSolver.h"
#include "AbstractFOCCZ4Solver_ADERDG.h"
#ifndef POSTPROCESSING_ConstraintsWriter_CLASS_HEADER_
#define POSTPROCESSING_ConstraintsWriter_CLASS_HEADER_
#include "exahype/plotters/Plotter.h"
namespace FOCCZ4{
namespace FOCCZ4 {
class FOCCZ4Solver;
class ConstraintsWriter;
/**
* Forward declaration
*/
class FOCCZ4Solver_ADERDG;
class FOCCZ4Solver_FV;
}
class FOCCZ4::ConstraintsWriter: public exahype::plotters::Plotter::UserOnTheFlyPostProcessing{
double timeLastWarned;
public:
static constexpr int numberOfVariables = FOCCZ4::AbstractFOCCZ4Solver_ADERDG::NumberOfVariables;
static constexpr int order = FOCCZ4::AbstractFOCCZ4Solver_ADERDG::Order;
static constexpr int basisSize = order + 1;
static constexpr int basisSize3 = basisSize*basisSize*basisSize;
public:
ConstraintsWriter(FOCCZ4Solver_ADERDG& solver);
ConstraintsWriter(FOCCZ4Solver_FV& solver);
ConstraintsWriter(exahype::solvers::LimitingADERDGSolver& solver);
class FOCCZ4::ConstraintsWriter : public exahype::plotters::Plotter::UserOnTheFlyPostProcessing {
public:
ConstraintsWriter(FOCCZ4::FOCCZ4Solver& solver);
virtual ~ConstraintsWriter();
void startPlotting(double time) override;
void finishPlotting() override;
void mapQuantities(
......@@ -43,19 +26,10 @@ class FOCCZ4::ConstraintsWriter: public exahype::plotters::Plotter::UserOnTheFly
const tarch::la::Vector<DIMENSIONS, double>& sizeOfPatch,
const tarch::la::Vector<DIMENSIONS, double>& x,
const tarch::la::Vector<DIMENSIONS, int>& pos,
double* Q, double* gradQ,
double* outputQuantities,
double* const Q,
double* const gradQ,
double* const outputQuantities,
double timeStamp) override;
void mapQuantities(
const tarch::la::Vector<DIMENSIONS, double>& offsetOfPatch,
const tarch::la::Vector<DIMENSIONS, double>& sizeOfPatch,
const tarch::la::Vector<DIMENSIONS, double>& x,
const tarch::la::Vector<DIMENSIONS, int>& pos,
double* Q,
double* outputQuantities,
double timeStamp) override;
bool mapWithDerivatives() override;
};
#endif /* POSTPROCESSING_ConstraintsWriter_CLASS_HEADER_ */
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