NSVE_field_stats.hpp 2.61 KB
Newer Older
Cristian Lalescu's avatar
Cristian Lalescu committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**********************************************************************
*                                                                     *
*  Copyright 2017 Max Planck Institute                                *
*                 for Dynamics and Self-Organization                  *
*                                                                     *
*  This file is part of bfps.                                         *
*                                                                     *
*  bfps is free software: you can redistribute it and/or modify       *
*  it under the terms of the GNU General Public License as published  *
*  by the Free Software Foundation, either version 3 of the License,  *
*  or (at your option) any later version.                             *
*                                                                     *
*  bfps is distributed in the hope that it will be useful,            *
*  but WITHOUT ANY WARRANTY; without even the implied warranty of     *
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      *
*  GNU General Public License for more details.                       *
*                                                                     *
*  You should have received a copy of the GNU General Public License  *
*  along with bfps.  If not, see <http://www.gnu.org/licenses/>       *
*                                                                     *
* Contact: Cristian.Lalescu@ds.mpg.de                                 *
*                                                                     *
**********************************************************************/



#ifndef NSVE_FIELD_STATS_HPP
#define NSVE_FIELD_STATS_HPP

#include <cstdlib>
#include <sys/types.h>
#include <sys/stat.h>
#include <vector>
#include "base.hpp"
#include "field.hpp"
#include "field_binary_IO.hpp"
#include "full_code/postprocess.hpp"

template <typename rnumber>
class NSVE_field_stats: public postprocess
{
    private:
        field_binary_IO<rnumber, COMPLEX, THREE> *bin_IO;
    public:
Cristian Lalescu's avatar
Cristian Lalescu committed
45
        std::string fftw_plan_rigor;
46

Cristian Lalescu's avatar
Cristian Lalescu committed
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
        field<rnumber, FFTW, THREE> *vorticity;

        NSVE_field_stats(
                const MPI_Comm COMMUNICATOR,
                const std::string &simulation_name):
            postprocess(
                    COMMUNICATOR,
                    simulation_name){}
        virtual ~NSVE_field_stats(){}

        virtual int initialize(void);
        virtual int work_on_current_iteration(void);
        virtual int finalize(void);

        int read_current_cvorticity(void);
sniklas142's avatar
sniklas142 committed
62
        int read_arbitrary_cvorticity(int iter);
Cristian Lalescu's avatar
Cristian Lalescu committed
63
64
65
66
};

#endif//NSVE_FIELD_STATS_HPP