ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
OutputProbeGNU.h
Go to the documentation of this file.
1//
2// ,---. ,--, .---. ,--, ,---. .-. .-.
3// | .-' .' .') / .-. ) .' .' | .-' | \| |
4// | `-. | |(_) | | |(_) | | __ | `-. | | |
5// | .-' \ \ | | | | \ \ ( _) | .-' | |\ |
6// | `--. \ `-. \ `-' / \ `-) ) | `--. | | |)|
7// /( __.' \____\ )---' )\____/ /( __.' /( (_)
8// (__) (_) (__) (__) (__)
9// Official webSite: https://code-mphi.github.io/ECOGEN/
10//
11// This file is part of ECOGEN.
12//
13// ECOGEN is the legal property of its developers, whose names
14// are listed in the copyright file included with this source
15// distribution.
16//
17// ECOGEN is free software: you can redistribute it and/or modify
18// it under the terms of the GNU General Public License as published
19// by the Free Software Foundation, either version 3 of the License,
20// or (at your option) any later version.
21//
22// ECOGEN is distributed in the hope that it will be useful,
23// but WITHOUT ANY WARRANTY; without even the implied warranty of
24// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25// GNU General Public License for more details.
26//
27// You should have received a copy of the GNU General Public License
28// along with ECOGEN (file LICENSE).
29// If not, see <http://www.gnu.org/licenses/>.
30
31#ifndef OUTPUTPROBEGNU_H
32#define OUTPUTPROBEGNU_H
33
34#include "OutputGNU.h"
35#include "../Maths/GOLine.h"
36#include "../Maths/GOPlan.h"
37
40
42{
43 public:
55 OutputProbeGNU(std::string casTest, std::string run, tinyxml2::XMLElement* element, std::string fileName, Input* entree);
56 ~OutputProbeGNU() override;
57
58 void probeDisplacement(const double& dt) override;
59
60 void locateProbeInMesh(const TypeMeshContainer<Cell*>& cells, const int& nbCells, bool localSeeking = false) override;
61 Cell* locateProbeInAMRSubMesh(std::vector<Cell*>* cells, const int& nbCells) override;
62
63 void initializeSpecificOutput() override;
64 void writeResults(Mesh* /*mesh*/, std::vector<Cell*>* /*cellsLvl*/) override;
65
66 void initializeOutputInfos() override {}; //nothing to print
67 void writeInfos() override {};
68
69 //Accessors
70 double getNextTime() override { return m_nextAcq; };
71 bool possesses() override { return m_possessesProbe[rankCpu]; };
72
73 private:
74 double m_acqFreq;
75 double m_nextAcq;
80};
81
82#endif //OUTPUTPROBEGNU_H
int rankCpu
Definition Parallel.cpp:36
std::vector< Type > TypeMeshContainer
Template for the type of the mesh container (std::list for now, but may change to something else if w...
Definition Tools.h:194
Base class for a mesh cell.
Definition Cell.h:59
Abstract class for geometric object.
Definition GeometricObject.h:41
Definition Input.h:55
Abstract class for a mesh.
Definition Mesh.h:55
OutputGNU()
Default constructor for specific output without specific needs.
Definition OutputGNU.cpp:38
void locateProbeInMesh(const TypeMeshContainer< Cell * > &cells, const int &nbCells, bool localSeeking=false) override
Definition OutputProbeGNU.cpp:114
Cell * m_cell
Pointer to the level 0 cell containing the probe.
Definition OutputProbeGNU.h:76
GeometricObject * m_objet
To store position.
Definition OutputProbeGNU.h:78
double getNextTime() override
Definition OutputProbeGNU.h:70
Cell * locateProbeInAMRSubMesh(std::vector< Cell * > *cells, const int &nbCells) override
Definition OutputProbeGNU.cpp:155
double m_acqFreq
Acquisition time frequency.
Definition OutputProbeGNU.h:74
void writeInfos() override
Definition OutputProbeGNU.h:67
double m_nextAcq
Next acquisition time.
Definition OutputProbeGNU.h:75
void probeDisplacement(const double &dt) override
Definition OutputProbeGNU.cpp:96
void initializeOutputInfos() override
Definition OutputProbeGNU.h:66
Cell * m_cellAMR
Pointer to the most refined cell containing the probe.
Definition OutputProbeGNU.h:77
void initializeSpecificOutput() override
Definition OutputProbeGNU.cpp:181
bool possesses() override
Definition OutputProbeGNU.h:71
~OutputProbeGNU() override
Definition OutputProbeGNU.cpp:88
OutputProbeGNU(std::string casTest, std::string run, tinyxml2::XMLElement *element, std::string fileName, Input *entree)
Probe output constructor from a XML format reading.
Definition OutputProbeGNU.cpp:39
bool * m_possessesProbe
True if the CPU possesses probe.
Definition OutputProbeGNU.h:79
void writeResults(Mesh *, std::vector< Cell * > *) override
Definition OutputProbeGNU.cpp:214
Definition tinyxml2.h:1148