CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

PointMesh

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   February 2, 2007, 14:42
Default Hey, I'd like to use a poin
  #1
Senior Member
 
Markus Hartinger
Join Date: Mar 2009
Posts: 102
Rep Power: 9
hartinger is on a distinguished road
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
hartinger is offline   Reply With Quote

Old   October 12, 2011, 13:40
Default
  #2
Senior Member
 
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 9
Arnoldinho is on a distinguished road
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
Arnoldinho is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 14:02.