From 5540e49090e07c4e0a4d6938750f35966fc4c58e Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Mon, 6 Dec 2010 14:35:12 +0100 Subject: [PATCH] ProcessModeMatch: Now uses drawing units for its mode functions & docu update --- Common/processmodematch.cpp | 2 +- Common/processmodematch.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Common/processmodematch.cpp b/Common/processmodematch.cpp index b661672..805d8d0 100644 --- a/Common/processmodematch.cpp +++ b/Common/processmodematch.cpp @@ -116,7 +116,7 @@ void ProcessModeMatch::InitProcess() unsigned int pos[3] = {0,0,0}; double discLine[3] = {0,0,0}; - double gridDelta = Op->GetGridDelta(); + double gridDelta = 1; // 1 -> mode-matching function is definied in drawing units... double var[7]; pos[m_ny] = start[m_ny]; discLine[m_ny] = Op->GetDiscLine(m_ny,pos[m_ny],m_dualMesh); diff --git a/Common/processmodematch.h b/Common/processmodematch.h index f68b10d..9f19726 100644 --- a/Common/processmodematch.h +++ b/Common/processmodematch.h @@ -22,6 +22,11 @@ class CSFunctionParser; +//! Processing class to match a mode to a given analytic function and return the integral value. +/*! + The analytric function has to be definied in drawing units. + It will return the integral value and the mode purity as a secondary value. + */ class ProcessModeMatch : public ProcessIntegral { public: @@ -31,7 +36,9 @@ public: virtual void InitProcess(); virtual void Reset(); + //! Set the field type (0 electric field, 1 magnetic field) void SetFieldType(int type); + //! Set the mode function in the given direction ny. For example: SetModeFunction(0,"cos(pi/1000*x)*sin(pi/500*y)"); void SetModeFunction(int ny, string function); virtual int GetNumberOfIntegrals() const {return 2;}