|
[Sponsors] |
Pasing Pointers to functions solve and linearInterpolate |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 7, 2011, 10:05 |
Pasing Pointers to functions solve and linearInterpolate
|
#1 |
Member
O R
Join Date: Mar 2009
Posts: 50
Rep Power: 17 |
Dear All,
I don't think this was asked before. I am using another pakage to link against the OpenFOAM lib , I decided that the best way would be to use a pointer to the fields as global variables. so far all seems to be working well but I think (i hope I am wrong) I reach a deadlock Code:
volScalarField *pT; Time *pRT ; //Function 1 void Init(){ pT=new Foam::volScalarField ( IOobject ( "T", pRT->timeName(), *pMesh ... ), *pMesh ); // This woks so far perfectly i e: pT->internalField, pMesh->C(), etc } // Function 2 void solveEQ(){ while (pRT->loop()) { solve( fvm::laplacian(1.0, *pT) //DOES NOT WORK ); pRT->write(); } } finiteVolume/lnInclude/fvmLaplacian.C:185: error: in passing argument 2 of ‘Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::laplacian(const Foam::dimensioned<Type2>&, Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = double, GType = double] So the Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>& thinks that *pT is other type. In fact is volScalarField (or VolVectorField if i have to use vec field) The same is Code:
linearInterpolate((*pT)) & pMesh->Sf() Is there A way to force laplacian (or other operator) to accept my syntax Thanks for you Help |
|
|
|