CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   PointMesh (https://www.cfd-online.com/Forums/openfoam-solving/59836-pointmesh.html)

hartinger February 2, 2007 13:42

Hey, I'd like to use a poin
 
Hey,

I'd like to use a pointScalarField in order to output some point based data. But for some the pointBoundaryMesh is not accessible and the compiler throws following error:


applications/ehlDeflection> ./Allwmake
make: Nothing to be done for `allFiles'.
make: `lnInclude/uptodate' is up to date.
Making dependency list for source file ehlDeflection.C
libso
SOURCE_DIR=.
SOURCE=ehlDeflection.C ; g++ -m32 -Dlinux -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-30 -I/home/uderzo/mh/OpenFOAM/OpenFOAM-1.3/src/finiteVolume/lnInclude -I.. -I/home/uderzo/mh/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -pthread -c $SOURCE -o Make/linuxGcc4DPOpt/ehlDeflection.o
ehlDeflection.C: In member function 'void Foam::ehlDeflection::writeDeflection(Foam::fileNam e)':
ehlDeflection.C:2350: error: no match for 'operator[]' in '((Foam::GeometricField<double,>::GeometricBoundar yField*)deflection. Foam::GeometricField<type,>::boundaryField [with Type = double, PatchField = Foam::pointPatchField, GeoMesh = Foam::pointMesh]())->Foam::GeometricField<double,>::GeometricBoundaryF ield::<ano nymous>.Foam::FieldField<foam::pointpatchfield,>:: <anonymous>.Foam::PtrList<t>:: operator[] [with T = Foam::pointPatchField<double>](patchI)[pointI]'
make: *** [Make/linuxGcc4DPOpt/ehlDeflection.o] Error 1


the code is:

pointMesh pMesh(mesh_);

pointScalarField deflection
(
IOobject
(
"deflection",
Time_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
pMesh,
dimensionSet(0,1,0,0,0,0,0)
);
deflection = 0;


forAll(pMesh.boundary(), patchI)
{
const vectorField & localPoints =
pMesh.boundary()[patchI].localPoints();
forAll(localPoints, pointI)
{
// line of error:
deflection.boundaryField()[patchI][pointI] = 0.0;
}
}


anybody any idea?
thanks
markus

Arnoldinho October 12, 2011 13:40

Hi Markus,

sorry for digging out this rather old thread, but I'm facing the exactly same problem right now. Can you remember if you solved this?

To not double-post it, please find the link here: http://www.cfd-online.com/Forums/ope...tml#post327701

Best regards,
Arne


All times are GMT -4. The time now is 05:52.