Overture  Version 25
DerivedFunctions.h
Go to the documentation of this file.
1 #ifndef DERIVED_FUNCTIONS_H
2 #define DERIVED_FUNCTIONS_H
3 
4 #include "ShowFileReader.h"
6 
7 // Derive new functions from old ones. This class is used by plotStuff to
8 // create derived quantities such as vorticity, mach-number, derivatives etc.
9 
11 {
12  public:
13 
15  {
20  enstrophy, // || vorticity ||
47  // -- E&M variables
48  energyDensity, // E*E + H*H
49  eFieldNorm, // || E ||
50  hFieldNorm, // || H ||
51  // Solid mechanics
55  };
56 
57 
61 
62 
63  int add( int derivative, const aString & name_, int n1=0, int n2=0 );
64 
65  int getASolution(int & solutionNumber,
66  MappedGrid & cg,
68 
69  int getASolution(int & solutionNumber,
70  CompositeGrid & cg,
72 
73  int getDisplacementComponents( int &u1c, int & u2c, int & u3c );
74 
75  int getVelocityComponents( int &v1c, int & v2c, int & v3c );
76 
77  int getStressComponents( int & s11c, int & s12c, int & s13c,
78  int & s21c, int & s22c, int & s23c,
79  int & s31c, int & s32c, int & s33c );
80 
81 
83 
84  int remove( int i );
85 
86  void set( ShowFileReader & showFileReader );
87 
88  // A user can define new derived functions using these functions
90  int numberOfComponents,
91  aString *componentNames );
92 
93  int getUserDefinedDerivedFunction( int index,
94  int indexOut,
95  const aString & name,
96  const int numberOfComponents,
99  bool & interpolationRequired );
100 
101  // update current list of derived grid functions
102  int update( GenericGraphicsInterface & gi,
103  int numberOfComponents,
104  aString *componentNames,
105  GraphicsParameters *pgp=NULL );
106 
107 
108  protected:
109 
111  int getComponent( int & c, const aString & cName );
112  void initialize();
113 
118 
119  // Schlieren parameters
121 
122 
123  int velocityComponent[3]; // Array holding the velocity components
124  int displacementComponent[3]; // displacement components
125  int stressComponent[9]; // stress components
126 
127 };
128 
129 #endif