05.03., 9:00 - 11:00: Due to updates GitLab will be unavailable for some minutes between 09:00 and 11:00.

Commit 8042243a authored by Anne Reinarz's avatar Anne Reinarz

constraints writer

parent 561a0319
......@@ -5,11 +5,8 @@
// ========================
// www.exahype.eu
// ========================
#include "PDE.h" // ADMConstraints()
#include "AbstractFOCCZ4Solver_ADERDG.h"
#include "ConstraintsWriter.h"
#include "PDE.h"
FOCCZ4::ConstraintsWriter::ConstraintsWriter(FOCCZ4::FOCCZ4Solver& solver) {
// @TODO Please insert your code here.
......@@ -32,17 +29,17 @@ void FOCCZ4::ConstraintsWriter::mapQuantities(
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* gradQ,
double* const outputQuantities,
double timeStamp
) {
// this should be a UserOnTheFlyPostProcessing constant,
// allowing to ensure we write out 6 unknowns.
static constexpr int writtenUnknowns = 6;
static constexpr int writtenUnknowns = 6;
for(int i=0; i<59; i++) { if(Q[i]!=Q[i]) std::abort(); }
admconstraints_(outputQuantities, Q, gradQ);
for(int i=0; i<6; i++) { if(outputQuantities[i]!=outputQuantities[i]) std::abort(); }
}
......@@ -21,13 +21,15 @@ public:
void startPlotting(double time) override;
void finishPlotting() override;
bool mapWithDerivatives() override {
return true;
}
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* const Q,
double* const gradQ,
double* const Q, double* gradQ,
double* const outputQuantities,
double timeStamp) override;
};
......
......@@ -202,12 +202,12 @@
"output": "./output/adm-integrals"
},
{
"type": "vtk::Cartesian::vertices::binary",
"type": "vtk::Legendre::vertices::ascii",
"name": "ConstraintsWriter",
"variables": 6,
"time": 0.0,
"repeat": 0.01,
"output": "./vtk-output/constraints"
"output": "./output/constraints"
},
{
"type": "probe::ascii",
......
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