include/qcggs.h

00001 /***************************************************************************
00002  *   Quantum Construct (qC++)                                                                  *
00003  *   The Quantum Physics Computational Library                                         *
00004  *   Copyright (C) 2005 by Shekhar S. Chandra                                      *
00005  *   Shekhar.Chandra@sci.monash,edu.au                                     *
00006  *                                                                         *
00007  *   This program is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU General Public License as published by  *
00009  *   the Free Software Foundation; either version 2 of the License, or     *
00010  *   (at your option) any later version.                                   *
00011  *                                                                         *
00012  *   This program is distributed in the hope that it will be useful,       *
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00015  *   GNU General Public License for more details.                          *
00016  *                                                                         *
00017  *   You should have received a copy of the GNU General Public License     *
00018  *   along with this program; if not, write to the                         *
00019  *   Free Software Foundation, Inc.,                                       *
00020  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00021  ***************************************************************************/
00022 /*
00023         Ver Info - QCGGS.h
00024         1.0.0 - Original Implementation
00025 */
00026 
00027 #ifndef QCGGS_H
00028 #define QCGGS_H
00029 
00030 #include <string>
00031 
00032 #include "qccomplexfield.h"
00033 #include "qc2componentbec.h"
00034 
00040 class QCGGS
00041 {
00042 public:
00043     // -------------------------------------------------------
00049     QCGGS();
00053     ~QCGGS();
00055 
00056     // -------------------------------------------------------
00062     void setNoOfImages(int number);
00066     void setIteration(int number)
00067     {   iterationNo = number;        }
00071     void setMaxIterations(int max)
00072     {   maxIterations = max;        }
00076     void setMaxTimeSteps(int max)
00077     {   maxTimeSteps = max;        }
00081     void setFilePrefix(string prefix)
00082     {   filePrefix = prefix;        }
00086     void setSystem(QCQuantumSystem<complexType,2> &system);
00090     void setSystem(QC2ComponentBEC<2> &system);
00094     void setGuess(parameterType mag, parameterType phase);
00098     int getNoOfImages()
00099     {   return noOfImages;          }
00103     int getIterationNo()
00104     {   return iterationNo;          }
00108     int getMaxIterations()
00109     {   return maxIterations;       }
00113     int getTimeSteps()
00114     {   return maxTimeSteps;        }
00118     string getFilePrefix()
00119     {   return filePrefix;          }
00123     QCQuantumSystem<complexType,2>* getSystem()
00124     {   return ptrSystem;           }
00128     void loadImages(string extension);
00132     void writeResults(string extension);
00136     void writeOriginals(string extension);
00138 
00139     // -------------------------------------------------------
00145     void copyField(QCComplexField<2>& dest, QCComplexField<2>& source);
00149     void copyField(QCComplexField<2>& dest, Array<complexType,2>& source);
00153     void updateMagnitude(QCComplexField<2>& image, QCComplexField<2>& result);
00157     void updateMagnitude(QCComplexField<2>& image, Array<complexType,2>& result);
00161     parameterType RMSError(QCComplexField<2>& original, QCComplexField<2>& result);
00165     parameterType RMSError(QCComplexField<2>& original, Array<complexType,2> &result);
00169     parameterType iterate(QCBEC<2> &bec);
00173     parameterType iterate(QC2ComponentBEC<2> &bec);
00175 
00176 
00177 protected:
00178     int noOfImages; 
00179     int iterationNo; 
00180     int maxIterations; 
00181     int maxTimeSteps; 
00182     parameterType rmsError; 
00183     string filePrefix; 
00184     QCQuantumSystem<complexType,2> *ptrSystem; 
00185     Array<complexType,2> *ptrField; 
00186     Array<complexType,2> *ptrField2; 
00187     Array<QCComplexField<2>,1> GSPhases; 
00188     Array<QCComplexField<2>,1> GSPhases2; 
00189     Array<QCComplexField<2>,1> Images; 
00190     Array<QCComplexField<2>,1> Images2; 
00191     bool twoCompBEC; 
00192 };
00193 
00194 #endif // QCGGS_H

Generated on Sat May 13 13:22:48 2006 for Quantum Construct (qC++) by  doxygen 1.4.6-NO