// globalconf.cpp // // last-edit-by: J.A. de Jong // // Description: // ////////////////////////////////////////////////////////////////////// #include "globalconf.h" #include "tasmet_constants.h" #include "tasmet_exception.h" #include "tasmet_io.h" GlobalConf::GlobalConf(us Nf,d freq): _Nf(Nf) { TRACE(10,"GlobalConf constructor done"); if(Nf>=constants::maxNf) throw TaSMETError("Too large number of frequencies given"); us Ns=this->Ns(); // Reinitialize all operators _iDFT=zeros(Ns,Ns); _fDFT=zeros(Ns,Ns); _fDFT.row(0).fill(1.0/double(Ns)); for(us i=1;i<=_Nf;i++){ for(us j=0; j(Ns(),Ns()); // Sanity checks if(omgconstants::maxomg) throw TaSMETError("Illegal frequency given"); this->_omg=omg; for(us i=1;i<=_Nf;i++){ _DDTfd(2*i-1,2*i )=-double(i)*_omg; _DDTfd(2*i ,2*i-1)=double(i)*_omg; } } //////////////////////////////////////////////////////////////////////