111 |
|
|
112 |
|
void SphereHarm::printShapesFileStart(char name[200], char particle[80], |
113 |
|
double mass, double momInert[3][3]){ |
114 |
< |
ofstream shapes(name); |
114 |
> |
ofstream myShapes(name); |
115 |
> |
printShapesStreamStart(myShapes, particle, mass, momInert); |
116 |
> |
} |
117 |
> |
|
118 |
> |
void SphereHarm::printShapesStreamStart(ostream& shapes, char particle[80], |
119 |
> |
double mass, double momInert[3][3]){ |
120 |
|
shapes << "begin ShapeInfo\n"; |
121 |
|
shapes << "#name\t\tmass\tI_xx\tI_yy\tI_zz\n"; |
122 |
|
shapes << particle << "\t" << mass << "\t" << momInert[0][0] << "\t" |
124 |
|
shapes << "end ShapeInfo\n"; |
125 |
|
} |
126 |
|
|
127 |
+ |
|
128 |
+ |
|
129 |
|
void SphereHarm::printToShapesFile(char name[200], int index, double tolVal){ |
130 |
|
ofstream shapes(name, ios::app); |
131 |
+ |
|
132 |
+ |
printToShapesStream(shapes, index, tolVal); |
133 |
+ |
} |
134 |
+ |
|
135 |
+ |
void SphereHarm::printToShapesStream(ostream& shapes, int index, double tolVal) { |
136 |
|
|
137 |
|
biggest = 0.0; |
138 |
|
nfuncs = 0; |