2010-06-28 17:45:19 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2010 Thorsten Liebig (Thorsten.Liebig@gmx.de)
|
|
|
|
*
|
|
|
|
* This program 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.
|
|
|
|
*
|
|
|
|
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PROCESSINTEGRAL_H
|
|
|
|
#define PROCESSINTEGRAL_H
|
|
|
|
|
|
|
|
#include "processing.h"
|
|
|
|
|
|
|
|
//! Abstract base class for integral parameter processing
|
2010-09-09 08:02:33 +00:00
|
|
|
/*!
|
|
|
|
\todo Weighting is applied equally to all integral parameter --> todo: weighting for each result individually
|
|
|
|
*/
|
2010-06-28 17:45:19 +00:00
|
|
|
class ProcessIntegral : public Processing
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ~ProcessIntegral();
|
|
|
|
|
|
|
|
virtual void InitProcess();
|
2010-08-11 10:28:09 +00:00
|
|
|
|
2011-01-18 09:34:13 +00:00
|
|
|
virtual string GetProcessingName() const = 0;
|
|
|
|
|
2013-01-22 08:22:01 +00:00
|
|
|
virtual void GetNormalDir(int nd) {m_normDir=nd;}
|
|
|
|
|
2010-08-11 10:28:09 +00:00
|
|
|
//! Flush FD data to disk
|
2010-06-28 17:45:19 +00:00
|
|
|
virtual void FlushData();
|
|
|
|
|
2010-09-09 08:02:33 +00:00
|
|
|
//! This method can calculate multiple integral parameter and must be overloaded for each derived class. \sa GetNumberOfIntegrals
|
|
|
|
/*!
|
|
|
|
This method will store its integral results internally with a size given by GetNumberOfIntegrals()
|
|
|
|
It will return the result for the CalcIntegral() as default.
|
|
|
|
*/
|
|
|
|
virtual double* CalcMultipleIntegrals();
|
|
|
|
|
2011-01-18 09:34:13 +00:00
|
|
|
//! Get the name of the integral for the given row. The names will be used in the file header.
|
|
|
|
virtual string GetIntegralName(int row) const = 0;
|
|
|
|
|
2010-09-09 08:02:33 +00:00
|
|
|
//! Number of calculated results produced by this integral processing. \sa CalcMultipleIntegrals
|
|
|
|
virtual int GetNumberOfIntegrals() const {return 1;}
|
|
|
|
|
2010-08-11 10:28:09 +00:00
|
|
|
//! This method should calculate the integral parameter and must be overloaded for each derived class
|
|
|
|
virtual double CalcIntegral() {return 0;}
|
|
|
|
|
|
|
|
//! This method will write the TD and FD dump files using CalcIntegral() to calculate the integral parameter
|
|
|
|
virtual int Process();
|
|
|
|
|
2010-06-28 17:45:19 +00:00
|
|
|
protected:
|
2010-12-07 15:47:23 +00:00
|
|
|
ProcessIntegral(Engine_Interface_Base* eng_if);
|
2010-06-28 17:45:19 +00:00
|
|
|
|
2011-01-05 15:25:50 +00:00
|
|
|
void Dump_FD_Data(double factor, string filename);
|
2010-09-09 08:02:33 +00:00
|
|
|
|
2011-01-05 15:25:50 +00:00
|
|
|
vector<double_complex> *m_FD_Results;
|
2010-09-09 08:02:33 +00:00
|
|
|
double *m_Results;
|
2013-01-22 08:22:01 +00:00
|
|
|
|
|
|
|
int m_normDir; // normal direction as required by some integral processings
|
2010-06-28 17:45:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PROCESSINTEGRAL_H
|