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

Porting meshBalancing to OF2.1.1

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 13, 2018, 13:55
Default Porting meshBalancing to OF2.1.1
  #1
New Member
 
Pete
Join Date: Feb 2016
Posts: 7
Rep Power: 10
strakey is on a distinguished road
Hi All - I am trying to port a dynamic load balancing routine (https://github.com/tgvoskuilen/meshBalancing) that was written for OF2.3.x to OF 2.1.1. The file dynamic RefineBalancedFvMeshTemplates.C file throws a compilation error as such: error: no mathcing function for call to Foam::HashTable<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>. This refers to the line "HashTable<GeoField*> flds(this....." around the 9th line below

The code is as follows:

Code:
#include "GeometricField.H"
#include "volMesh.H"
#include "fvPatchField.H"

template<class Type>
void Foam::dynamicRefineBalancedFvMesh::correctBoundaries()
{
    typedef GeometricField<Type, fvPatchField, volMesh> GeoField;

    HashTable<GeoField*> flds(this->objectRegistry::lookupClass<GeoField>());

    forAllIter(typename HashTable<GeoField*>, flds, iter)
    {
        GeoField& fld = *iter();
        
        //mimic "evaluate" but only for coupled patches (processor or cyclic)
        // and only for blocking or nonBlocking comms (no scheduled comms)
        if
        (
            Pstream::defaultCommsType == Pstream::blocking
         || Pstream::defaultCommsType == Pstream::nonBlocking
        )
        {
            label nReq = Pstream::nRequests();

            forAll(fld.boundaryField(), patchi)
            {
                if(fld.boundaryField()[patchi].coupled())
                {
                    fld.boundaryField()[patchi].initEvaluate
                    (
                        Pstream::defaultCommsType
                    );
                }
            }

            // Block for any outstanding requests
            if
            (
                Pstream::parRun()
             && Pstream::defaultCommsType == Pstream::nonBlocking
            )
            {
                Pstream::waitRequests(nReq);
            }

            forAll(fld.boundaryField(), patchi)
            {
                if(fld.boundaryField()[patchi].coupled())
                {
                    fld.boundaryField()[patchi].evaluate
                    (
                        Pstream::defaultCommsType
                    );
                }
            }
        }
        else
        {
            //Scheduled patch updates not supported
            FatalErrorIn
            (
                "dynamicRefineBalancedFvMeshTemplates::correctBoundaries"
            )   << "Unsuported communications type "
                << Pstream::commsTypeNames[Pstream::defaultCommsType]
                << exit(FatalError);
        }
    }
}
Anyone have any idea why this would compile just fine in 2.3 and not in 2.1.1?

Thanks much!
Pete
strakey is offline   Reply With Quote

Reply

Tags
load balancing, meshbalancing


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
can not complie fluentDataToFoam in OF2.1.1 hewei OpenFOAM Pre-Processing 20 September 8, 2018 09:19
TwoPhaseEulerFoam high particle diameter problem OF2.1.1 mwaqas OpenFOAM Running, Solving & CFD 0 May 24, 2015 08:45
[Other] How to define internal walls for injector inside a combustion chamber by OF2.1.1 with sandy13 OpenFOAM Meshing & Mesh Conversion 0 May 22, 2013 06:59
Porting FoamX to cygwin using the latest version of MICO 7islands OpenFOAM Pre-Processing 17 December 31, 2008 01:27
Porting from T3E to SP2 Dr. Saud Khashan Main CFD Forum 0 May 23, 2000 15:43


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