Skip to content
Snippets Groups Projects
Commit df0f18fc authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

modify postprocessing class

doesn't do anything for now
parent 3731bd46
No related branches found
No related tags found
1 merge request!21Bugfix/nansampling
/**********************************************************************
* *
* 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 POSTPROCESS_HPP
#define POSTPROCESS_HPP
#include "base.hpp"
int grow_single_dataset(hid_t dset, int tincrement);
herr_t grow_dataset_visitor(
hid_t o_id,
const char *name,
const H5O_info_t *info,
void *op_data);
class direct_numerical_simulation
{
public:
int myrank, nprocs;
MPI_Comm comm;
std::string simname;
int iteration, checkpoint;
int checkpoints_per_file;
int niter_out;
int niter_stat;
int niter_todo;
hid_t stat_file;
bool stop_code_now;
int nx;
int ny;
int nz;
int dealias_type;
double dkx;
double dky;
double dkz;
direct_numerical_simulation(
const MPI_Comm COMMUNICATOR,
const std::string &simulation_name);
virtual ~direct_numerical_simulation(){}
virtual int write_checkpoint(void) = 0;
virtual int initialize(void) = 0;
virtual int step(void) = 0;
virtual int do_stats(void) = 0;
virtual int finalize(void) = 0;
int main_loop(void);
int read_iteration(void);
int write_iteration(void);
int grow_file_datasets(void);
int check_stopping_condition(void);
};
#endif//DIRECT_NUMERICAL_SIMULATION_HPP
#include <string>
#include <cmath>
#include "NSVEparticles.hpp"
#include "scope_timer.hpp"
template <typename rnumber>
int NSVEparticles<rnumber>::initialize(void)
{
return EXIT_SUCCESS;
}
template <typename rnumber>
int NSVEparticles<rnumber>::step(void)
{
return EXIT_SUCCESS;
}
template <typename rnumber>
int NSVEparticles<rnumber>::write_checkpoint(void)
{
return EXIT_SUCCESS;
}
template <typename rnumber>
int NSVEparticles<rnumber>::finalize(void)
{
this->NSVE<rnumber>::finalize();
return EXIT_SUCCESS;
}
template <typename rnumber>
int NSVEparticles<rnumber>::do_stats()
{
return EXIT_SUCCESS;
}
template class NSVEparticles<float>;
template class NSVEparticles<double>;
...@@ -24,55 +24,40 @@ ...@@ -24,55 +24,40 @@
#ifndef POSTPROCESS_FIELDS_HPP #ifndef PPNSVE_HPP
#define POSTPROCESS_FIELDS_HPP #define PPNSVE_HPP
#include <cstdlib>
#include "base.hpp" #include "base.hpp"
#include "direct_numerical_simulation.hpp" #include "vorticity_equation.hpp"
#include "full_code/direct_numerical_simulation.hpp"
#include "full_code/NSVE.hpp"
class postprocess_fields template <typename rnumber>
class ppNSVE: public NSVE<rnumber>
{ {
public: public:
int myrank, nprocs;
MPI_Comm comm;
std::string simname;
int iteration, checkpoint;
int checkpoints_per_file;
int niter_out;
int niter_stat;
int niter_todo;
hid_t stat_file;
bool stop_code_now;
int nx; ppNSVE(
int ny;
int nz;
int dealias_type;
double dkx;
double dky;
double dkz;
direct_numerical_simulation(
const MPI_Comm COMMUNICATOR, const MPI_Comm COMMUNICATOR,
const std::string &simulation_name); const std::string &simulation_name):
virtual ~direct_numerical_simulation(){} NSVE<rnumber>(
COMMUNICATOR,
virtual int write_checkpoint(void) = 0; simulation_name){}
virtual int initialize(void) = 0; ~ppNSVE(){}
virtual int step(void) = 0;
virtual int do_stats(void) = 0; int initialize(void);
virtual int finalize(void) = 0; int step(void);
int finalize(void);
virtual int read_parameters(void);
int write_checkpoint(void);
int do_stats(void);
int main_loop(void); int main_loop(void);
int read_iteration(void);
int write_iteration(void);
int grow_file_datasets(void);
int check_stopping_condition(void);
}; };
#endif//POSTPROCESS_FIELDS_HPP #endif//PPNSVE_HPP
...@@ -88,7 +88,8 @@ print('This is bfps version ' + VERSION) ...@@ -88,7 +88,8 @@ print('This is bfps version ' + VERSION)
### lists of files and MANIFEST.in ### lists of files and MANIFEST.in
src_file_list = ['field_binary_IO', src_file_list = ['full_code/ppNSVE',
'field_binary_IO',
'full_code/direct_numerical_simulation', 'full_code/direct_numerical_simulation',
'full_code/NSVE', 'full_code/NSVE',
'full_code/NSVEparticles', 'full_code/NSVEparticles',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment