Seperate Operator init

pull/1/head
Thorsten Liebig 2010-03-05 13:53:05 +01:00
parent 5ee107fcbc
commit 161bdf9c28
3 changed files with 13 additions and 7 deletions

View File

@ -63,13 +63,8 @@ void CartOperator::SetGeometryCSX(ContinuousStructure* geo)
MainOp->AddCellAdrOp(); MainOp->AddCellAdrOp();
} }
int CartOperator::CalcECOperator() void CartOperator::InitOperator()
{ {
if (Calc_EC()==0)
return -1;
CalcTimestep();
Delete_N_3DArray(vv,numLines); Delete_N_3DArray(vv,numLines);
Delete_N_3DArray(vi,numLines); Delete_N_3DArray(vi,numLines);
Delete_N_3DArray(iv,numLines); Delete_N_3DArray(iv,numLines);
@ -78,6 +73,16 @@ int CartOperator::CalcECOperator()
vi = Create_N_3DArray(numLines); vi = Create_N_3DArray(numLines);
iv = Create_N_3DArray(numLines); iv = Create_N_3DArray(numLines);
ii = Create_N_3DArray(numLines); ii = Create_N_3DArray(numLines);
}
int CartOperator::CalcECOperator()
{
if (Calc_EC()==0)
return -1;
CalcTimestep();
InitOperator();
unsigned int i=0; unsigned int i=0;
unsigned int pos[3]; unsigned int pos[3];

View File

@ -20,6 +20,7 @@ public:
protected: protected:
virtual void Init(); virtual void Init();
virtual void InitOperator();
AdrOp* MainOp; AdrOp* MainOp;
AdrOp* DualOp; AdrOp* DualOp;

View File

@ -24,7 +24,7 @@ public:
protected: protected:
ProcessFields(Operator* op, Engine* eng); ProcessFields(Operator* op, Engine* eng);
bool DumpFieldArray2VTK(ofstream &file, string name, FDTD_FLOAT**** array, double** discLines, unsigned int* numLines); static bool DumpFieldArray2VTK(ofstream &file, string name, FDTD_FLOAT**** array, double** discLines, unsigned int* numLines);
int DumpMode; int DumpMode;
int DumpType; int DumpType;