I have to evaluate the components of a 6x6 matrix $S$. This matrix depends upon the semi-axes of an ellipsoid $a1$, $a2$ and $a3$.
For various specific cases (sphere, prolate spheroid, oblate spheroid, cylinder) I have the close-form solution for $S$.
However, in the general ellipsodal case S is calculated numerically.
Let's say that in:
- Subsection_1: I give S for the case of sphere
- Subsection_2: I give S for the case of prolate spheroid
- Subsection_3: I give S for the case of oblate spheroid
- Subsection_4: I give S for the case of cylinder
- Subsection_5: I give for the case of a general ellipsoid
What I want is for the correct form of the function
S[a1, a2, a3] to be called depending to the values of $a1$, $a2$, $a3$.
If, for instance, $a1=1$, $a2=1$, $a3=1000$, then Subsection_4 (and only this) will be executed and for the rest of the Section
S will have the corresponding value for the cylinder case.
How can I accomplish this?