|
[Sponsors] |
July 13, 2018, 14:55 |
Porting meshBalancing to OF2.1.1
|
#1 |
New Member
Pete
Join Date: Feb 2016
Posts: 8
Rep Power: 10 |
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); } } } Thanks much! Pete |
|
Tags |
load balancing, meshbalancing |
|
|
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 10:19 |
TwoPhaseEulerFoam high particle diameter problem OF2.1.1 | mwaqas | OpenFOAM Running, Solving & CFD | 0 | May 24, 2015 09: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 07:59 |
Porting FoamX to cygwin using the latest version of MICO | 7islands | OpenFOAM Pre-Processing | 17 | December 31, 2008 02:27 |
Porting from T3E to SP2 | Dr. Saud Khashan | Main CFD Forum | 0 | May 23, 2000 16:43 |