Commit 31b5eb94 authored by Anne Reinarz's avatar Anne Reinarz
Browse files

tecplot writer now optional

parent 31e64c7d
......@@ -10,6 +10,7 @@
#include "FOCCZ4Solver_FV.h"
#include <algorithm>
#include <cstring>
#include "FOCCZ4Solver_ADERDG_Variables.h"
#include "kernels/GaussLegendreBasis.h"
......@@ -41,11 +42,13 @@ void FOCCZ4::FOCCZ4Solver_ADERDG::init(const std::vector<std::string>& cmdlinear
std::string reference = constants.getValueAsString("reference");
const int length=reference.length();
logInfo("init(...)","Reference setup:"<<reference);
#if HAVE_TECPLOT
printf("\n******************************************************************");
printf("\n**************<<< INIT TECPLOT >>>****************************");
printf("\n******************************************************************");
inittecplot_(&order,&order,&basisSize,&Ghostlayers);
//inittecplot_(&order,&order);
#endif
printf("\n******************************************************************");
printf("\n**************<<< INIT PDE SETUP >>>****************************");
printf("\n******************************************************************\n");
......@@ -468,4 +471,4 @@ void FOCCZ4::FOCCZ4Solver_ADERDG::MyNewRusanovSolver(
#endif
\ No newline at end of file
#if HAVE_TECPLOT
MODULE TECPLOTPLOTTERmod
IMPLICIT NONE
......@@ -1278,4 +1280,6 @@ SUBROUTINE gauleg(x1,x2,x,w,n)
END SUBROUTINE gauleg
END MODULE TECPLOTPLOTTERmod
\ No newline at end of file
END MODULE TECPLOTPLOTTERmod
#endif
#if HAVE_TECPLOT
RECURSIVE SUBROUTINE ElementCallTECPLOTPLOTTER(wh_in,lx0,ldx,limiter)
USE TECPLOTPLOTTERmod
USE MainVariables, only : nVar, nDim
......@@ -41,4 +43,4 @@ RECURSIVE SUBROUTINE FinishTECPLOTPLOTTER(Myrank)
CALL FinalizeTECPLOTPLOTTER(Myrank)
END SUBROUTINE FinishTECPLOTPLOTTER
#endif
#if HAVE_TECPLOT
#ifndef __EXAHYPE_USER_TECINT__
#define __EXAHYPE_USER_TECINT__
......@@ -13,3 +15,4 @@ void initializetecplotplotter_(const double* time);
}/* extern "C" */
#endif /* __EXAHYPE_USER_PDE__ */
#endif
......@@ -7,7 +7,9 @@
// ========================
#include "TecplotWriter.h"
#if HAVE_TECPLOT
#include "TECPLOTinterface.h"
#endif
#include "tarch/parallel/Node.h"
#include "tarch/parallel/NodePool.h"
#include <stdio.h>
......@@ -34,8 +36,10 @@ void FOCCZ4::TecplotWriter::plotADERDGPatch(
const tarch::la::Vector<DIMENSIONS, double>& sizeOfPatch, double* const u,
double timeStamp) {
// @TODO Please insert your code here.
#if HAVE_TECPLOT
plotForADERSolver = 0;
elementcalltecplotplotter_(u,&offsetOfPatch[0],&sizeOfPatch[0],&plotForADERSolver);
#endif
}
void FOCCZ4::TecplotWriter::plotFiniteVolumesPatch(
......@@ -43,19 +47,25 @@ void FOCCZ4::TecplotWriter::plotFiniteVolumesPatch(
const tarch::la::Vector<DIMENSIONS, double>& sizeOfPatch, double* const u,
double timeStamp) {
// @TODO Please insert your code here.
#if HAVE_TECPLOT
plotForADERSolver = 1;
elementcalltecplotfvplotter_(u, &offsetOfPatch[0], &sizeOfPatch[0], &plotForADERSolver);
#endif
}
void FOCCZ4::TecplotWriter::startPlotting( double time) {
// @TODO Please insert your code here.
#if HAVE_TECPLOT
mpirank = tarch::parallel::Node::getInstance().getRank();
initializetecplotplotter_(&time);
#endif
}
void FOCCZ4::TecplotWriter::finishPlotting() {
// @TODO Please insert your code here.
#if HAVE_TECPLOT
finishtecplotplotter_(&mpirank);
}
\ No newline at end of file
#endif
}
! Tools.f90
#if HAVE_TECPLOT
RECURSIVE SUBROUTINE InitTECPLOT(N_in,M_in,SubLim_in,Ghostlayers_in)
USE TECPLOTPLOTTERmod
implicit none
......@@ -16,7 +16,7 @@ END SUBROUTINE InitTECPLOT
! CALL SetMainParameters(N_in,SubLim_in,Ghostlayers_in)
!END SUBROUTINE InitTECPLOT
#endif
RECURSIVE SUBROUTINE getNumericalSolution(V,Q)
USE MainVariables, ONLY: nVar
......
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