Fixes some weirdness that Fred reported. Used his patch with one mod.
This commit is contained in:
parent
f4403fdea8
commit
ee84e76641
1 changed files with 31 additions and 12 deletions
|
@ -92,14 +92,33 @@ FlapData::FlapData(const char* filename){
|
||||||
//Frees all memory associated with this object
|
//Frees all memory associated with this object
|
||||||
FlapData::~FlapData(){
|
FlapData::~FlapData(){
|
||||||
// printf("deleting flapdata\n");
|
// printf("deleting flapdata\n");
|
||||||
delete liftTable;
|
int i, j, k;
|
||||||
delete thrustTable;
|
for(i=0;i<alphaLength;i++){
|
||||||
delete momentTable;
|
for(j=0;j<speedLength;j++){
|
||||||
delete inertiaTable;
|
for(k=0;k<freqLength;k++){
|
||||||
delete alphaArray;
|
delete[] liftTable[i][j][k];
|
||||||
delete speedArray;
|
delete[] thrustTable[i][j][k];
|
||||||
delete freqArray;
|
delete[] momentTable[i][j][k];
|
||||||
delete phiArray;
|
delete[] inertiaTable[i][j][k];
|
||||||
|
}
|
||||||
|
delete[] liftTable[i][j];
|
||||||
|
delete[] thrustTable[i][j];
|
||||||
|
delete[] momentTable[i][j];
|
||||||
|
delete[] inertiaTable[i][j];
|
||||||
|
}
|
||||||
|
delete[] liftTable[i];
|
||||||
|
delete[] thrustTable[i];
|
||||||
|
delete[] momentTable[i];
|
||||||
|
delete[] inertiaTable[i];
|
||||||
|
}
|
||||||
|
delete[] liftTable;
|
||||||
|
delete[] thrustTable;
|
||||||
|
delete[] momentTable;
|
||||||
|
delete[] inertiaTable;
|
||||||
|
delete alphaArray;
|
||||||
|
delete speedArray;
|
||||||
|
delete freqArray;
|
||||||
|
delete phiArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
//An initialization function that does the same thing
|
//An initialization function that does the same thing
|
||||||
|
@ -299,10 +318,10 @@ int FlapData::readIn (ifstream* f){
|
||||||
momentTable[i][j]=new double*[freqLength];
|
momentTable[i][j]=new double*[freqLength];
|
||||||
inertiaTable[i][j]=new double*[freqLength];
|
inertiaTable[i][j]=new double*[freqLength];
|
||||||
for(k=0;k<freqLength;k++){
|
for(k=0;k<freqLength;k++){
|
||||||
assert((liftTable[i][j][k]=new double[phiLength])!=NULL);
|
liftTable[i][j][k]=new double[phiLength];
|
||||||
assert((thrustTable[i][j][k]=new double[phiLength])!=NULL);
|
thrustTable[i][j][k]=new double[phiLength];
|
||||||
assert((momentTable[i][j][k]=new double[phiLength])!=NULL);
|
momentTable[i][j][k]=new double[phiLength];
|
||||||
assert((inertiaTable[i][j][k]=new double[phiLength])!=NULL);
|
inertiaTable[i][j][k]=new double[phiLength];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue