Acoustic Research Tool (ART)  v0.10
WindInstrument Class Reference
Inheritance diagram for WindInstrument:
HornElement

Public Member Functions

 WindInstrument (const char filename[], const bool setDefault)
 WindInstrument (const WindInstrument &a)
 WindInstrument (HornElement *c)
 WindInstrument (const bool supressedLists, const char filename[])
 GADefineIdentity ("WindInstrument", 223)
WindInstrumentoperator= (const GAGenome &orig)
virtual GAGenome * clone (CloneMethod) const
virtual void copy (const GAGenome &orig)
void elementInitialise (const double previousRout)
int mutate (const float pmut, const float mu, const double previousRout)
HornElementclone ()
void elementCrossover (const HornElement &m, HornElement *s, HornElement *b, const float pcross)
double rIn () const
double rOut () const
double gradientIn () const
double gradientOut () const
string Name () const
double findRadius (const double x) const
string getSaveString () const
void print () const
dcomp zt (const double w) const
int RadiationType () const
string filename () const
int type () const
int TlaAccumulate (const double w, int IndFreq, SimpleMatrix *a, const int Ind, vector< int > &mem, dcomp *zt, list< Matrix > *ImpedanceList, vector< int > &IndHole)
int MultimodeAccumulate (const double w, int IndFreq, const bool bends, Matrix *a, const int Ind, vector< int > &mem, Matrix *zt, list< Matrix > *ImpedanceList, vector< int > &IndHole)
void multimodeInputImpedance (const double w, const bool bends, Matrix *Zout)
dcomp radiationImpedance (const double w) const
dcomp ZorumskiPlaneRadiation (const double w) const
void multimodeRadiationImpedance (const double w, const bool bends, const int IndFreq, Matrix *result) const
void multimodeRadiationImpedanceClosedEnd (const double w, const bool bends, Matrix *result) const
void multimodeRadiationImpedanceOpenEnd (const double w, const bool bends, Matrix *result) const
void multimodeRadiationImpedanceTerminated (const double w, const bool bends, Matrix *result, const dcomp z_trm) const
dcomp PlaneWaveRadiationImpedance_TermElt (const double w) const
void radiationImpedanceLevine (const double w, double *InputRadius, dcomp *z_t) const
Matrix GetTerminationImpedance (const double w, int IndFreq, Matrix *zt, int test, int NextPos, vector< int > &mem, HornElement *iter, list< Matrix > *ImpedanceList)
dcomp GetTerminationImpedance (const double w, int IndFreq, dcomp *zt, int test, int NextPos, vector< int > &mem, HornElement *iter, list< Matrix > *ImpedanceList)
void BranchImpedanceList (list< Matrix > *ImpListe)
void PutRoutParam (const double rOut)
void PutHoleParam (const double length_Hole, const double radius_Hole)
Matrix GetParallelImpedance (const double w, const int IndFreq)
Matrix GetImpedance (const double w, const int IndFreq)
void ImpLengthCorrection ()
void ImpEltsAcoustic ()
vector< dcomp > getInputImpedance (const double f, const int t, int IndFreq, const int Contrib, const double gain, const int val, list< Matrix > *ImpedanceList, const int var, vector< int > &IndHole, const int accumulate)
dcomp getInputImpedance (const double f, const int t, const bool accum)
vector< dcomp > getParam (const double Freq, const double IndFreq, const int Contrib, const int Ind, list< Matrix > *ImpedanceList, const int var, vector< int > &IndHole)
vector< dcomp > getRadiationImpedance (const double Freq, const double IndFreq, const int Contrib, const int Ind, list< Matrix > *ImpedanceList, const int var, vector< int > &IndHole)
double inputImpedanceMagnitude (const double f, const int term, const bool accumulate)
void cleanElements ()
void copyLists (list< HornElement * > *orig)
void printList (bool indent)
int getSize ()
void setToDefault ()
list< HornElement * >::iterator begin ()
int write (std::ostream &os) const
double length () const
void setLength (double length)
void ListSplit (bool modifyDefault)
bool check ()
void rosen (double *params)
list< HornElement * > getList () const
HornElementgetElement (int i)
void append (HornElement *a, bool addJumps)
void erase ()
void erase (int i)
void chgtempC (const float tempC)
void chglossF (const float lossF)
void insert (HornElement *a)
void setIterToBegin ()
void setIterToEnd ()
void setVerboseMode (const bool isVerbose)
void setSupressedLists (const bool isSupressed)
void setOutputMode (const bool isMaple)
bool getOutputMode () const
int getSize () const
ImpedanceCurve getImpedanceCurve ()
void printImpedanceCurve (const bool carriageReturn) const
void printDescription () const
void printList (const bool indent) const
void compareBore (const char instrumentFile[], const char outputFile[]) const
void roughPlot (const int nModes, const double fmin, const double fmax, const int nPoints, const bool accumulate)
void roughPlot (const int nModes, const double fmin, const double fmax, const int nPoints, const bool accumulate, const int termination)
void refinePeaks (const double epsilon, const int t, const bool accumulate)
void refinePeaks (const double epsilon)
void recursiveQuadraticFindPeak (const double xLeft, const double rLeft, const double xCentre, const double rCentre, const double xRight, const double rRight, const double epsilon, const int counter, const int t, const bool accum)
void recursiveCombinedFindPeak (const double xLeft, const double rLeft, const double xCentre, const double rCentre, const double xRight, const double rRight, const double epsilon, const int counter, const int t, const bool accum)
void toLowerCase (char a[]) const
bool stringEquality (char a[], char b[]) const
int parseInt (const char input[], int *ptr) const
char * parseString (const char input[], int *ptr) const
double parseDouble (const char input[], int *ptr) const
dcomp parseDcomp (const char input[], int *ptr) const
bool parseBool (const char input[], int *ptr) const
void runScript (const char filename[])
void saveImpedancePlot (const char filename[])
void saveInstrumentPlot (const char filename[])
void loadPointwise (const char filename[])
void savePointwise (const char filename[])
int savePointwise (std::ofstream *file, double *x, const bool asMaple)
bool loadElemental (const char filename[])
void saveElemental (const char filename[])
bool load (const char filename[])
void save (const char filename[])
- Public Member Functions inherited from HornElement
 HornElement (const float tempC=21.0, const float lossF=1.0, const float humidity=80, const float xc=382, const string name=" ", int type=-1, Matrix MA=NULL, Matrix MB=NULL, double rr=0.0, double length=0.0, const bool canSplit=false, const bool canModify=false)
virtual void setnModes (const int nModes)
virtual void FirstElement (const int val)
virtual int FirstElement () const
void settempC (float tempC)
float gettempC () const
void setlossF (float lossF)
float getlossF () const
void sethumidity (float humidity)
float gethumidity () const
void setxc (float xc)
float getxc () const
void setName (string name)
string getName () const
virtual void length (const double length)
virtual int NbHole () const
virtual bool split (list< HornElement * > &l, list< HornElement * >::iterator &iter)
virtual ARTvariant * getPropertyPointer (const char *name)

Static Public Member Functions

static float Compare (const GAGenome &, const GAGenome &)
static float Evaluate (GAGenome &)
static int ListCrossover (const GAGenome &m, const GAGenome &d, GAGenome *s, GAGenome *b)
static int ListMutator (GAGenome &c, float pmut)
static void ListInitializer (GAGenome &c)
static bool loadTargetImpedanceCurve (const char filename[])
static bool getHasTarget ()
static ImpedanceCurvegetTarget ()
static void loadBase (const char filename[])
- Static Public Member Functions inherited from HornElement
static int getnModes ()
static void setlossy (const bool lossy)
static bool getlossy ()
static void setfmin (const double fmin)
static double getfmin ()
static void setfmax (const double fmax)
static double getfmax ()
static void setdf (const double df)
static double getdf ()
static void setsimplified (const bool simplified)
static bool getsimplified ()
static void setboreresolution (const double boreresolution)
static double getboreresolution ()
static void SetImpedanceFile (const char filemame[], int RadHole, int Contrib, vector< Matrix > &Z)

Public Attributes

list< HornElement * >::iterator iter
ImpedanceCurve impedanceCurve
int * paramRefs_
int term

Static Public Attributes

static bool hasBends_ = false
static bool fixedTerm_ = false
static bool hasBranch_ = false
- Static Public Attributes inherited from HornElement
static vector< double > Freq

Additional Inherited Members

- Static Protected Member Functions inherited from HornElement
static void cylTlaAccumulate (const double w, const double length, const double radius, const float T, const float F, const float H, const float XC, SimpleMatrix *a)
static dcomp radiationImpedanceLevineCyl (const double w, const double radius, const float T, const float H, const float XC)
static dcomp cylZorumskiPlaneRadiation (const double w, const double radius, const float T, const float H, const float XC)
static void coneTlaAccumulate (const double w, const double Xin, const double Xout, const double Rin, const double Rout, const float T, const float F, const float H, const float XC, SimpleMatrix *a)
static dcomp radiationImpedanceLevineCone (const double w, const double Xin, const double Xout, const double Rin, const double Rout, const float T, const float H, const float XC)
static void kn (const double w, const double radius, const bool lossy, const bool bends, const float T, const float L, const float H, const float XC, dcomp *kn)
static double Dn (const double tau, const int i, const double kR)
static double Dmn (const double tau, const int m, const int n, const double kR)
static void jumpMultimodeInputImpedance (const double w, double *rr, Matrix *A, Matrix *B, Matrix *Zout, const double rIn, const double rOut, const bool bends, const float T)
static void cylMultimodeInputImpedance (const double w, Matrix *Zout, const double length, const double radius, const bool lossy, const bool simplified, const bool bends, const float T, const float L, const float H, const float XC)
static void cylBendMultimodeInputImpedance (const double w, Matrix *Zout, const double length, const double radius, const double bendRadius, const bool lossy, const float T, const float L, const float Humidity, const float XC)
static int cylMultimodeAccumulate (const double w, const double length, const double radius, const bool lossy, const bool bends, const float T, const float F, const float H, const float XC, Matrix *a)
static void jumpMultimodeTransmMatrix (double zeta, const bool bends, Matrix *a)
static void cylBendMultimodeAccumulate (const double w, const double length, const double radius, const double bendRadius, const bool lossy, const float T, const float Humidity, const float XC, Matrix *a)
static void radiationImpedanceZorumski (const double w, Matrix *result, const double radius, const bool bends, const float T, const float H, const float XC)
static void radiationImpedanceInfiniteCylPipe (const double w, Matrix *result, const double radius, const float T, const float H, const float XC)
static void radiationImpedanceTerminated (const double w, Matrix *result, const double radius, const bool bends, const float T, const float H, const float XC, const dcomp z_trm)
static void initMatrices ()
static int mIndex (const int alpha, const bool bends)
static int nIndex (const int beta, const bool bends)
- Protected Attributes inherited from HornElement
int type_
string name_
float tempC_
float humidity_
float xc_
float lossF_
int FirstElement_
double length_
bool canModify_
bool canSplit_
Matrix MA_
Matrix MB_
double rr_
- Static Protected Attributes inherited from HornElement
static int nModes_ = 0
static bool LOSSY_ = true
static bool SIMPLIFIED_ = false
static double BORERESOLUTION_ = 0.2
static double F_MAX_ = 1800
static double F_MIN_ = 0
static double D_F_ = 10
static vector< MatrixMZ
static Matrix I_
static Matrix D_
static Matrix Zc_
static Matrix ZcInv_
static Matrix F_
static dcomp * ki_
static double * D1_
static double * D2_
static bool haveInitMatrices = false