Vergleichen der Dateien bem.cpp und KOPIE VON BEM.CPP
***** bem.cpp
//todo get surface charges per electrode

***** KOPIE VON BEM.CPP
F//todo get surface charges per electrode

*****

***** bem.cpp
#undef StrDup;

***** KOPIE VON BEM.CPP
#undef StrDup;
#define CHECKLICENSE

*****

***** bem.cpp
#define _WIN32_WINNT 0x0501

#include <windows.h>
#include <stdio.h>
***** KOPIE VON BEM.CPP
#define _WIN32_WINNT 0x0501
#ifdef CHECKLICENSE
#include <windows.h>
#endif
#include <stdio.h>
*****

***** bem.cpp

#include <windows.h>

***** KOPIE VON BEM.CPP


*****

***** bem.cpp

extern "C" void Cross_Product(double vector1[],double vector2[],double result_vector[]);
***** KOPIE VON BEM.CPP


extern "C" void Cross_Product(double vector1[],double vector2[],double result_vector[]);
*****

***** bem.cpp
//undokument if numerical sollution should be enforced
//return calc.triangleint(calcD3triangle::G3D,xp,yp,zp,x1,y1,z1,x2,y2,z2,x3,y3,z3);
        
***** KOPIE VON BEM.CPP
//undokument if numerical sollution should be enforced
        return calc.triangleint(calcD3triangle::G3D,xp,yp,zp,x1,y1,z1,x2,y2,z2,x3,y3,z3);
        
*****

***** bem.cpp
double D3triangle::GetDoubleLayerPotentialAt(double x,double y,double z){
        return calc.G3DdnAnalytic
(x,y,z,x1,y1,z1,x2,y2,z2,x3,y3,z3,inversenorm);//undocument if nonanalytical sollution is wanted

***** KOPIE VON BEM.CPP
double D3triangle::GetDoubleLayerPotentialAt(double x,double y,double z){
        //return calc.G3DdnAnalytic(x,y,z,x1,y1,z1,x2,y2,z2,x3,y3,z3,inversenorm);//undocument if nonanalytical sollution is wa
ted

*****

***** bem.cpp
        {
                  DWORD dwRes, dwDisposition;
***** KOPIE VON BEM.CPP
        {
#ifdef CHECKLICENSE
                  DWORD dwRes, dwDisposition;
*****

***** bem.cpp

        
}
***** KOPIE VON BEM.CPP

#endif
}
*****

***** bem.cpp
        strcpy(cachefilename,_cachefilename);

        char fname[MAX_PATH];
***** KOPIE VON BEM.CPP
        strcpy(cachefilename,_cachefilename);
#ifdef CHECKLICENSE
        char fname[MAX_PATH];
*****

***** bem.cpp
        exit(0);
};
***** KOPIE VON BEM.CPP
        exit(0);
#endif
};
*****

***** bem.cpp
        delete[] dfdnAll;
        delete[] el;
        delete[] electrodeIndexLimit;
};
***** KOPIE VON BEM.CPP
        delete[] dfdnAll;
        
};
*****

***** bem.cpp

void D3ImportedElectrodes::Import(const char* file,bool ignore3DFace_,bool ignorePolyline_) {
    // Load DXF file into memory:
***** KOPIE VON BEM.CPP

bool D3ImportedElectrodes::Import(const char* file,bool ignore3DFace_,bool ignorePolyline_) {
    // Load DXF file into memory:
*****

***** bem.cpp
        std::cerr << file << " could not be opened.\n";
        return;
    }
***** KOPIE VON BEM.CPP
        std::cerr << file << " could not be opened.\n";
        return false;
    }
*****

***** bem.cpp
    delete dxf;

***** KOPIE VON BEM.CPP
    delete dxf;
        return true;

*****

***** bem.cpp
        int ii;
        for(ii=0;ii<nx*ny*nz*amountOfElectrodes;ii++) feldxcache[ii]*=spaceunit;
        for(ii=0;ii<nx*ny*nz*amountOfElectrodes;ii++) feldycache[ii]*=spaceunit;
        for(ii=0;ii<nx*ny*nz*amountOfElectrodes;ii++) feldzcache[ii]*=spaceunit;
        ofs.write((char *)feldxcache,nx*ny*nz*amountOfElectrodes*sizeof(double));
***** KOPIE VON BEM.CPP
        int ii;
        //for(ii=0;ii<nx*ny*nz*amountOfElectrodes;ii++) feldxcache[ii]*=spaceunit;
        //for(ii=0;ii<nx*ny*nz*amountOfElectrodes;ii++) feldycache[ii]*=spaceunit;
        //for(ii=0;ii<nx*ny*nz*amountOfElectrodes;ii++) feldzcache[ii]*=spaceunit;
        ofs.write((char *)feldxcache,nx*ny*nz*amountOfElectrodes*sizeof(double));
*****

***** bem.cpp
                color=(TColor*)(gROOT->GetListOfColors()->At(cnt));
                color->SetRGB(r,g,b);           
***** KOPIE VON BEM.CPP
                color=(TColor*)(gROOT->GetListOfColors()->At(cnt));
                if(color) delete color;
                color=new TColor();
                color->SetRGB(r,g,b);           
*****

***** bem.cpp
bool D3world::loadcalc(char *fname){
        checksum=       update_adler32(0,(unsigned char*)x,n*VERTS*DIMEN*sizeof(double));
        checksum=       update_adler32(checksum,(unsigned char*)shape,n*sizeof(int));
***** KOPIE VON BEM.CPP
bool D3world::loadcalc(char *fname){
        checksum=       update_adler32(BEMREVISION,(unsigned char*)x,n*VERTS*DIMEN*sizeof(double));
        checksum=       update_adler32(checksum,(unsigned char*)shape,n*sizeof(int));
*****

***** bem.cpp
        ifs.read((char *)feldzcache,nx*ny*nz*amountOfElectrodes*sizeof(double));
        int ii;
        for(ii=0;ii<nx*ny*nz*amountOfElectrodes;ii++) feldxcache[ii]/=spaceunit;
        for(ii=0;ii<nx*ny*nz*amountOfElectrodes;ii++) feldycache[ii]/=spaceunit;
        for(ii=0;ii<nx*ny*nz*amountOfElectrodes;ii++) feldzcache[ii]/=spaceunit;
        ifs.close();
        return true;
***** KOPIE VON BEM.CPP
        ifs.read((char *)feldzcache,nx*ny*nz*amountOfElectrodes*sizeof(double));
//      int ii;
        //for(ii=0;ii<nx*ny*nz*amountOfElectrodes;ii++) feldxcache[ii]/=spaceunit;
        //for(ii=0;ii<nx*ny*nz*amountOfElectrodes;ii++) feldycache[ii]/=spaceunit;
        //for(ii=0;ii<nx*ny*nz*amountOfElectrodes;ii++) feldzcache[ii]/=spaceunit;
        ifs.close();
//      savecalc(fname);
        return true;
*****

***** bem.cpp
bool D3world::load(char *fname){
        checksum=       update_adler32(0,(unsigned char*)x,n*VERTS*DIMEN*sizeof(double));
        checksum=       update_adler32(checksum,(unsigned char*)shape,n*sizeof(int));
***** KOPIE VON BEM.CPP
bool D3world::load(char *fname){
        checksum=       update_adler32(BEMREVISION,(unsigned char*)x,n*VERTS*DIMEN*sizeof(double));
        checksum=       update_adler32(checksum,(unsigned char*)shape,n*sizeof(int));
*****

***** bem.cpp
        memcpy(xxx4+3*xxxnum*DIMEN,xxx,xxxnum*DIMEN*sizeof(double));
        electrodeIndexLimit=new int[amountOfElectrodes+1];
        el=new PD3element[n];
        int cnt=0;
        GetListOfBaseElements(el,electrodeIndexLimit,cnt);
        int row,col;
***** KOPIE VON BEM.CPP
        memcpy(xxx4+3*xxxnum*DIMEN,xxx,xxxnum*DIMEN*sizeof(double));
        //electrodeIndexLimit=new int[amountOfElectrodes+1];
        //el=new PD3element[n];
        //int cnt=0;
        //GetListOfBaseElements(el,electrodeIndexLimit,cnt);
        int row,col;
*****

***** bem.cpp
        memcpy(FieldZ,potfieldxyz+3*xxxnum,xxxnum*sizeof(double));
        delete[] electrodeIndexLimit;
        delete[] el;
        delete[] potfieldxyz;
***** KOPIE VON BEM.CPP
        memcpy(FieldZ,potfieldxyz+3*xxxnum,xxxnum*sizeof(double));
        //delete[] electrodeIndexLimit;
        //delete[] el;
        delete[] potfieldxyz;
*****

***** bem.cpp
        for(col=0;col<n;col++){//geht alle Flächenelemente durch
                        if(col==1040){
                                int i=1;
                                i++;
                        }
                        double dummy=el[col]->GetPotentialAt(x,y,z);
***** KOPIE VON BEM.CPP
        for(col=0;col<n;col++){//geht alle Flächenelemente durch
        
                        double dummy=el[col]->GetPotentialAt(x,y,z);
*****

***** bem.cpp
                        beta2[col]=el[col]->GetDoubleLayerPotentialAt(x,y,z);
                        dfdnSuperposition[col]=0;
***** KOPIE VON BEM.CPP
                        beta2[col]=el[col]->GetDoubleLayerPotentialAt(x,y,z);
                        
                        dfdnSuperposition[col]=0;
*****

***** bem.cpp
        }
        
        for(elcnt=0;elcnt<amountOfElectrodes;elcnt++){
***** KOPIE VON BEM.CPP
        }
        for(elcnt=0;elcnt<amountOfElectrodes;elcnt++){
*****

***** bem.cpp
                
                for (col=0; col<n; col++)               //to call a Fortran routine from C we 
                        dfdnSuperposition[col]+=dfdn[col]*electrodeVoltage[elcnt];                            
        }
***** KOPIE VON BEM.CPP
                
                for (col=0; col<n; col++)       {       //to call a Fortran routine from C we
                        dfdnSuperposition[col]+=dfdn[col]*electrodeVoltage[elcnt];                        
                }
        }
*****

***** bem.cpp
                                        int i;
                                        i++;
                                }
***** KOPIE VON BEM.CPP
                                        int i;
                                //      i++;
                                }
*****

***** bem.cpp
#define MATRIXINVERSE
#define EXPORTDATA
#ifdef EXPORTDATA
***** KOPIE VON BEM.CPP
#define MATRIXINVERSE
//#define EXPORTDATA
#ifdef EXPORTDATA
*****

***** bem.cpp
        for(col=0;col<n;col++){//geht alle Flächenelemente durch
                        if(col==1040){
                                int i=1;
                                i++;
                        }
                        double dummy=el[col]->GetPotentialAt(x,y,z);
***** KOPIE VON BEM.CPP
        for(col=0;col<n;col++){//geht alle Flächenelemente durch
                
                        double dummy=el[col]->GetPotentialAt(x,y,z);
*****

***** bem.cpp
                        beta2[col]=el[col]->GetDoubleLayerPotentialAt(x,y,z);
                        dfdnSuperposition[col]=0;
***** KOPIE VON BEM.CPP
                        beta2[col]=el[col]->GetDoubleLayerPotentialAt(x,y,z);
                
                        dfdnSuperposition[col]=0;
*****

***** bem.cpp
        }
        
        for(elcnt=0;elcnt<amountOfElectrodes;elcnt++){
***** KOPIE VON BEM.CPP
        }
//      cout <<"**************************"<<endl;
        for(elcnt=0;elcnt<amountOfElectrodes;elcnt++){
*****

***** bem.cpp
                
                for (col=0; col<n; col++)               //to call a Fortran routine from C we 
                        dfdnSuperposition[col]+=dfdn[col]*electrodeVoltage[elcnt];                            
        }
***** KOPIE VON BEM.CPP
                
                for (col=0; col<n; col++){              //to call a Fortran routine from C we 
        //              cout <<dfdn[col]<<endl;
                        dfdnSuperposition[col]+=dfdn[col]*electrodeVoltage[elcnt];      
                }
        }
*****

