/* * Copyright (C) 2012-2014 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 . */ #ifndef NF2FF_H #define NF2FF_H #include #include #include #include #include #include "nf2ff_calc.h" using namespace std; class TiXmlElement; class nf2ff { public: nf2ff(vector freq, vector theta, vector phi, vector center, unsigned int numThreads=0); ~nf2ff(); bool AnalyseFile(string E_Field_file, string H_Field_file); void SetRadius(float radius); void SetPermittivity(vector permittivity); void SetPermeability(vector permeability); void SetMirror(int type, int dir, float pos); double GetTotalRadPower(size_t f_idx) const {return m_nf2ff.at(f_idx)->GetTotalRadPower();} double GetMaxDirectivity(size_t f_idx) const {return m_nf2ff.at(f_idx)->GetMaxDirectivity();} complex** GetETheta(size_t f_idx) const {return m_nf2ff.at(f_idx)->GetETheta();} complex** GetEPhi(size_t f_idx) const {return m_nf2ff.at(f_idx)->GetEPhi();} double** GetRadPower(size_t f_idx) const {return m_nf2ff.at(f_idx)->GetRadPower();} //! Write results to a hdf5 file bool Write2HDF5(string filename); void SetVerboseLevel(int level) {m_Verbose=level;} static bool AnalyseXMLNode(TiXmlElement* ti_nf2ff); static bool AnalyseXMLFile(string filename); protected: vector m_freq; vector m_permittivity; vector m_permeability; unsigned int m_numTheta; unsigned int m_numPhi; float* m_theta; float* m_phi; float m_radius; int m_Verbose; vector m_nf2ff; }; #endif // NF2FF_H