CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

gather parallelized fields

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 6, 2011, 12:27
Default gather parallelized fields
  #1
New Member
 
Michael Buchmayr
Join Date: Mar 2010
Posts: 16
Rep Power: 16
MichiB is on a distinguished road
Hi,
I'm trying to gather fields of boundary patches, which are distributed on multiple processors. I want to due this to generate specialised output using function objects.

I found a function that seems to do exactly what I need ( combineFields(...) ).
I included an adapted version of this function and included it into my functionObject.

Everything compiles smoothly but when the function is called I get an error.

The function looks like this:
Code:
template<class Type>
const tmp<Foam::Field<Type> > turboMonitorPool::combineFields
(
    const Field<Type>& field
) const
{
    List<Field<Type> > allValues(Pstream::nProcs());

    allValues[Pstream::myProcNo()] = field;

    Pstream::gatherList(allValues);

    if (Pstream::master())
    {
        return tmp<Field<Type> >
        (
            new Field<Type>
            (
                ListListOps::combine<Field<Type> >
                (
                    allValues,
                    accessOp<Field<Type> >()
                )
            )
        );
    }
    else
    {
        return tmp<Field<Type> >
        (
            new Field<Type>
            (
                field
            )
        );
        //return field;
    }
}
This is the call:
Code:
        
const fvMesh& mes = refCast<const fvMesh>(obr_);
const tmp< Field<vector> > myCf = combineFields(mes.Cf().boundaryField()[0] );
and this is the error message:
Code:
symbol lookup error: /graz/home/openfoam/OpenFOAM/openfoam-1.6-ext/lib/linux64GccDPOpt/libturboMonitor.so: undefined symbol: _ZNK4Foam16turboMonitorPool13combineFieldsINS_6VectorIdEEEEKNS_3tmpINS_5FieldIT_EEEERKS7_
So the argument that I'm passing is wrong, although I'm passing a field of Type (A special field of type).

Hope someone knows the answer to this one...

Cheers,
Michi
MichiB is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
The mysterious _0 fields stevenvanharen OpenFOAM Running, Solving & CFD 2 January 4, 2011 08:24
Missing fields in reconstructPar flowris OpenFOAM 1 July 9, 2010 03:48
domainIntegrate, dieselFoam and Lagrangian Fields mturcios777 OpenFOAM 0 May 14, 2010 16:16
PostChannel maka OpenFOAM Post-Processing 5 July 22, 2009 10:15
[OpenFOAM] paraFoam, problem loading 'volume fields' bigphil ParaView 0 April 29, 2009 10:36


All times are GMT -4. The time now is 11:46.