include/qcphase.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 - QCPhase.h
00024         1.0.0 - Original Implementation
00025 */
00026 
00027 #ifndef QCPHASE_H
00028 #define QCPHASE_H
00029 
00030 #include "qccomplexfield.h"
00031 #include "qcparameter.h"
00032 
00037 class QCPhase
00038 {
00039 public:
00040         // -------------------------------------------------------
00046         QCPhase(void);
00050         ~QCPhase(void);
00052 
00053         // -------------------------------------------------------
00060         parameterType constantFunction();
00065         parameterType spiralFunction(parameterType  x, parameterType y);
00069         void applyUniform(QCComplexField<2> &field, parameterType  deltaX, parameterType deltaY, int x0, int y0);
00073         void applyUniform(QCComplexField<3> &field, parameterType  deltaX, parameterType deltaY, parameterType deltaZ, int x0, int y0, int z0);
00077         void applyRandom(QCComplexField<2> &field, parameterType  deltaX, parameterType deltaY, int x0, int y0);
00081         void applyRandomQuadrant(QCComplexField<2> &field, parameterType deltaX, parameterType deltaY, int x0, int y0);
00086         void applyVortex(QCComplexField<2> &field, parameterType  deltaX, parameterType deltaY, int x0, int y0);
00091         void applyVortex(QCComplexField<3> &field, parameterType  deltaX, parameterType deltaY, parameterType deltaZ, int x0, int y0, int z0);
00096         void applyVortexReverse(QCComplexField<2> &field, parameterType deltaX, parameterType deltaY, int x0, int y0);
00100         void applyDisturbanceTypeI(QCComplexField<2> &field, parameterType deltaX, parameterType deltaY, int x0, int y0);
00104         void applyDisturbanceTypeII(QCComplexField<2> &field, parameterType deltaX, parameterType deltaY, int x0, int y0);
00108         void applyDisturbanceTypeII(QCComplexField<3> &field, parameterType deltaX, parameterType deltaY, int x0, int y0);
00110 
00111         // -------------------------------------------------------
00117         bool outputPhaseFunction(QCComplexField<2> &field, const char* filename);
00121         bool outputPhaseFunction(QCComplexField<3> &field, const char* filename);
00123 
00124         // -------------------------------------------------------
00130         void setDisturbPosition(int position)
00131         {       disturbPosition = position;     }
00135         void setDisturbWidth(int width)
00136         {       disturbWidth = width;   }
00140         void setDisturbHeight(parameterType height)
00141         {       disturbHeight = height; }
00145         int getDisturbPosition()
00146         {       return disturbPosition; }
00150         int getDisturbWidth()
00151         {       return disturbWidth;    }
00155         parameterType getDisturbHeight()
00156         {       return disturbHeight;   }
00158 private:
00159         int disturbPosition; 
00160         int disturbWidth; 
00161         parameterType disturbHeight; 
00162 };
00163 #endif

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