| 1 |
|
#include "SphereHarm.hpp" |
| 2 |
– |
#include "cospmls.h" |
| 3 |
– |
#include "makeweights.h" |
| 4 |
– |
#include "FST_semi_memo.h" |
| 2 |
|
|
| 3 |
|
SphereHarm::SphereHarm( int bandWidth ){ |
| 4 |
|
bw = bandWidth; |
| 109 |
|
weights ); |
| 110 |
|
} |
| 111 |
|
|
| 112 |
< |
void SphereHarm::printShapesFileStart(char name[200], string particle, |
| 112 |
> |
void SphereHarm::printShapesFileStart(char name[200], char particle[80], |
| 113 |
|
double mass, double momInert[3][3]){ |
| 114 |
|
ofstream shapes(name); |
| 115 |
+ |
shapes << "begin ShapeInfo\n"; |
| 116 |
+ |
shapes << "#name\t\tmass\tI_xx\tI_yy\tI_zz\n"; |
| 117 |
|
shapes << particle << "\t" << mass << "\t" << momInert[0][0] << "\t" |
| 118 |
< |
<< momInert[1][1] << "\t" << momInert[2][2] << "\n\n"; |
| 118 |
> |
<< momInert[1][1] << "\t" << momInert[2][2] << "\n"; |
| 119 |
> |
shapes << "end ShapeInfo\n"; |
| 120 |
|
} |
| 121 |
|
|
| 122 |
|
void SphereHarm::printToShapesFile(char name[200], int index){ |
| 188 |
|
} |
| 189 |
|
|
| 190 |
|
if (fabs(cm) > 0.01 * biggest) |
| 191 |
< |
shapes << l << "\t" << m << "\tcos\t" << cm << "\n"; |
| 191 |
> |
shapes << l << "\t" << m << "\tcos\t\t" << cm << "\n"; |
| 192 |
|
if (fabs(sm) > 0.01 * biggest) |
| 193 |
< |
shapes << l << "\t" << m << "\tsin\t" << sm << "\n"; |
| 193 |
> |
shapes << l << "\t" << m << "\tsin\t\t" << sm << "\n"; |
| 194 |
|
} |
| 195 |
|
} |
| 196 |
|
switch(index){ |
| 197 |
|
case 0:{ |
| 198 |
< |
shapes << "\nend ContactFunctions\n"; |
| 198 |
> |
shapes << "end ContactFunctions\n"; |
| 199 |
|
}; break; |
| 200 |
|
case 1:{ |
| 201 |
< |
shapes << "\nend RangeFunctions\n"; |
| 201 |
> |
shapes << "end RangeFunctions\n"; |
| 202 |
|
}; break; |
| 203 |
|
case 2:{ |
| 204 |
< |
shapes << "\nend StrengthFunctions\n"; |
| 204 |
> |
shapes << "end StrengthFunctions\n"; |
| 205 |
|
}; break; |
| 206 |
|
} |
| 207 |
|
} |