diff --git a/src/OpenFOAM/db/typeInfo/typeInfo.H b/src/OpenFOAM/db/typeInfo/typeInfo.H index c29d7713c93fec80f48afa8f7ca844e08a545daf..f0b1af2965ab79d58b8a59666f8e32481770e4f3 100644 --- a/src/OpenFOAM/db/typeInfo/typeInfo.H +++ b/src/OpenFOAM/db/typeInfo/typeInfo.H @@ -100,6 +100,27 @@ inline To& dynamicCast(From& r) } +//- Reference type cast template function, +// wraps dynamic_cast to handle bad_cast exception and generate a FatalError. +template<class To, class From> +inline To& dynamicCast(From& r, const dictionary& d) +{ + try + { + return dynamic_cast<To&>(r); + } + catch (std::bad_cast&) + { + FatalIOErrorInFunction(d) + << "Attempt to cast type " << typeid(r).name() + << " to type " << typeid(To).name() + << abort(FatalIOError); + + return dynamic_cast<To&>(r); + } +} + + //- Reference type cast template function. // As per dynamicCast, but handles type names via the virtual type() method. template<class To, class From> @@ -121,6 +142,27 @@ inline To& refCast(From& r) } +//- Reference type cast template function. +// As per dynamicCast, but handles type names via the virtual type() method. +template<class To, class From> +inline To& refCast(From& r, const dictionary& d) +{ + try + { + return dynamic_cast<To&>(r); + } + catch (std::bad_cast&) + { + FatalIOErrorInFunction(d) + << "Attempt to cast type " << r.type() + << " to type " << To::typeName + << abort(FatalIOError); + + return dynamic_cast<To&>(r); + } +} + + //- Check the typeid template<class TestType, class Type> inline bool isType(const Type& t) diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.C index 02e66ce22efb70cfe5483cfdd899d4536a4c1ba7..2ce727f3f57721745758a11e307d6f6f14cea5dd 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/cyclic/cyclicPointPatchField.C @@ -51,7 +51,7 @@ Foam::cyclicPointPatchField<Type>::cyclicPointPatchField ) : coupledPointPatchField<Type>(p, iF, dict), - cyclicPatch_(refCast<const cyclicPointPatch>(p)) + cyclicPatch_(refCast<const cyclicPointPatch>(p, dict)) { if (!isType<cyclicPointPatch>(p)) { diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.C index 011129adc8d377507a8b9a15983df8b482c9567c..1be4e558cc8c9b151ea6d78f73198243fcfda258 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/processor/processorPointPatchField.C @@ -49,7 +49,7 @@ Foam::processorPointPatchField<Type>::processorPointPatchField ) : coupledPointPatchField<Type>(p, iF, dict), - procPatch_(refCast<const processorPointPatch>(p)) + procPatch_(refCast<const processorPointPatch>(p, dict)) {} diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.C index aac70da39ff1321d01386809778d8a3e3593b272..01986e6af1908fff1571faa021900adf980bb6ef 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/processorCyclic/processorCyclicPointPatchField.C @@ -52,7 +52,7 @@ Foam::processorCyclicPointPatchField<Type>::processorCyclicPointPatchField ) : coupledPointPatchField<Type>(p, iF, dict), - procPatch_(refCast<const processorCyclicPointPatch>(p)), + procPatch_(refCast<const processorCyclicPointPatch>(p, dict)), receiveBuf_(0) {} diff --git a/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.C index 9351dac4bd80661bce44889672307b1680fa7263..ace223aaa635c2d154e23170ab6a8666f86eac28 100644 --- a/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/constraint/symmetryPlane/symmetryPlanePointPatchField.C @@ -48,7 +48,7 @@ Foam::symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField ) : basicSymmetryPointPatchField<Type>(p, iF, dict), - symmetryPlanePatch_(refCast<const symmetryPlanePointPatch>(p)) + symmetryPlanePatch_(refCast<const symmetryPlanePointPatch>(p, dict)) { if (!isType<symmetryPlanePointPatch>(p)) { diff --git a/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchField.C b/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchField.C index 4ef17cc1c29fa56fd30bf70f40a99998feb07604..0fd8e445fc352cb7b26b1b3ee535e5fa7ab85418 100644 --- a/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchField.C +++ b/src/finiteArea/fields/faPatchFields/basic/coupled/coupledFaPatchField.C @@ -76,7 +76,7 @@ Foam::coupledFaPatchField<Type>::coupledFaPatchField const dictionary& dict ) : - lduInterfaceField(refCast<const lduInterface>(p)), + lduInterfaceField(refCast<const lduInterface>(p, dict)), faPatchField<Type>(p, iF, dict) {} diff --git a/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.C b/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.C index f192714258d61a0ecd428a7dcd2abbb69ef8ff54..14fa7dcd3c34bbe53b74a363fcfa27186f371b03 100644 --- a/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.C +++ b/src/finiteArea/fields/faPatchFields/constraint/cyclic/cyclicFaPatchField.C @@ -75,7 +75,7 @@ Foam::cyclicFaPatchField<Type>::cyclicFaPatchField ) : coupledFaPatchField<Type>(p, iF, dict), - cyclicPatch_(refCast<const cyclicFaPatch>(p)) + cyclicPatch_(refCast<const cyclicFaPatch>(p, dict)) { if (!isA<cyclicFaPatch>(p)) { diff --git a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.C b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.C index b9bfdb2f1a72421f438f2eb2ee5e6c6a263f3362..9db7f49ac5df61d2b2a28e0c7943794a948ff436 100644 --- a/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.C +++ b/src/finiteArea/fields/faPatchFields/constraint/processor/processorFaPatchField.C @@ -92,7 +92,7 @@ Foam::processorFaPatchField<Type>::processorFaPatchField ) : coupledFaPatchField<Type>(p, iF, dict), - procPatch_(refCast<const processorFaPatch>(p)) + procPatch_(refCast<const processorFaPatch>(p, dict)) { if (!isType<processorFaPatch>(p)) { diff --git a/src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchField.C b/src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchField.C index a7f112f2b2c4483997ae1b1c2f41f3d048f1a1e6..0692c6a82d031e47acd3b68e2bdebf1c552b6876 100644 --- a/src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchField.C +++ b/src/finiteArea/fields/faePatchFields/constraint/cyclic/cyclicFaePatchField.C @@ -74,7 +74,7 @@ Foam::cyclicFaePatchField<Type>::cyclicFaePatchField ) : coupledFaePatchField<Type>(p, iF, dict), - cyclicPatch_(refCast<const cyclicFaPatch>(p)) + cyclicPatch_(refCast<const cyclicFaPatch>(p, dict)) { if (!isType<cyclicFaPatch>(p)) { diff --git a/src/finiteArea/fields/faePatchFields/constraint/processor/processorFaePatchField.C b/src/finiteArea/fields/faePatchFields/constraint/processor/processorFaePatchField.C index d2be94d30a8a268b78fe49b5d744a68b3709de34..fe3c5d7edc854992749d1a744a65cf17cee44d5b 100644 --- a/src/finiteArea/fields/faePatchFields/constraint/processor/processorFaePatchField.C +++ b/src/finiteArea/fields/faePatchFields/constraint/processor/processorFaePatchField.C @@ -87,7 +87,7 @@ Foam::processorFaePatchField<Type>::processorFaePatchField ) : coupledFaePatchField<Type>(p, iF, dict), - procPatch_(refCast<const processorFaPatch>(p)) + procPatch_(refCast<const processorFaPatch>(p, dict)) { if (!isType<processorFaPatch>(p)) { diff --git a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.C index d53c2505657503de552c5ee958025a248b102008..fb0454bdc29b0198720876f9ccf4b2352c3e1fd7 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/basic/coupled/coupledFvPatchField.C @@ -75,7 +75,7 @@ Foam::coupledFvPatchField<Type>::coupledFvPatchField const bool valueRequired ) : - LduInterfaceField<Type>(refCast<const lduInterface>(p)), + LduInterfaceField<Type>(refCast<const lduInterface>(p, dict)), fvPatchField<Type>(p, iF, dict, valueRequired) {} diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C index 9a6dc99faace92854a90aec98263fef6dad4e7c4..718fc5ca40c0df35d2aa581931763089be8d1e63 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclic/cyclicFvPatchField.C @@ -49,7 +49,7 @@ Foam::cyclicFvPatchField<Type>::cyclicFvPatchField ) : coupledFvPatchField<Type>(p, iF, dict, false), - cyclicPatch_(refCast<const cyclicFvPatch>(p)) + cyclicPatch_(refCast<const cyclicFvPatch>(p, dict)) { if (!isA<cyclicFvPatch>(p)) { diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C index 912c44173d70b79ba5fd22d13740df5dad6b4398..579faf41bf8770fcb0e7c2b47ad978c9bb4ddb12 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicACMI/cyclicACMIFvPatchField.C @@ -51,7 +51,7 @@ Foam::cyclicACMIFvPatchField<Type>::cyclicACMIFvPatchField : cyclicACMILduInterfaceField(), coupledFvPatchField<Type>(p, iF, dict, dict.found("value")), - cyclicACMIPatch_(refCast<const cyclicACMIFvPatch>(p)) + cyclicACMIPatch_(refCast<const cyclicACMIFvPatch>(p, dict)) { if (!isA<cyclicACMIFvPatch>(p)) { diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C index 5bbce362be86665293e9d4a402d538108fdfc004..2888814b1661ddd27afb057fd6e67cb1b19bb6aa 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C @@ -48,7 +48,7 @@ Foam::cyclicAMIFvPatchField<Type>::cyclicAMIFvPatchField : cyclicAMILduInterfaceField(), coupledFvPatchField<Type>(p, iF, dict, dict.found("value")), - cyclicAMIPatch_(refCast<const cyclicAMIFvPatch>(p)) + cyclicAMIPatch_(refCast<const cyclicAMIFvPatch>(p, dict)) { if (!isA<cyclicAMIFvPatch>(p)) { diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C index 84405f38323acea9d3d8b8cae847942194a8a27c..a9573c596fc68c80958b299728b2f8072bc71076 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/processor/processorFvPatchField.C @@ -76,7 +76,7 @@ Foam::processorFvPatchField<Type>::processorFvPatchField ) : coupledFvPatchField<Type>(p, iF, dict, dict.found("value")), - procPatch_(refCast<const processorFvPatch>(p)), + procPatch_(refCast<const processorFvPatch>(p, dict)), sendBuf_(0), receiveBuf_(0), outstandingSendRequest_(-1), diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C index 4cc2a4d53c51cb97ef840c4ced0bc6b523db2193..be958aaacf9e65b00e281d42d554c62db9e31b98 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/processorCyclic/processorCyclicFvPatchField.C @@ -51,7 +51,7 @@ Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField ) : processorFvPatchField<Type>(p, iF, dict), - procPatch_(refCast<const processorCyclicFvPatch>(p)) + procPatch_(refCast<const processorCyclicFvPatch>(p, dict)) { if (!isType<processorCyclicFvPatch>(p)) { diff --git a/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.C index 57d21f8f942ccb5f72e386ef170568281e17c569..f8a8d0e71ccef5f5aa43995e78589666e5b200c4 100644 --- a/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/constraint/symmetryPlane/symmetryPlaneFvPatchField.C @@ -73,7 +73,7 @@ Foam::symmetryPlaneFvPatchField<Type>::symmetryPlaneFvPatchField ) : basicSymmetryFvPatchField<Type>(p, iF, dict), - symmetryPlanePatch_(refCast<const symmetryPlaneFvPatch>(p)) + symmetryPlanePatch_(refCast<const symmetryPlaneFvPatch>(p, dict)) { if (!isType<symmetryPlaneFvPatch>(p)) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C index 4761e61da7e4cfc2fb1e07fde2a96f39661b5005..7b5a59106388ed8b84202b02b7119681664c7d99 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C @@ -96,7 +96,8 @@ activeBaffleVelocityFvPatchVectorField ( refCast<const cyclicFvPatch> ( - p.boundaryMesh()[cyclicPatchLabel_] + p.boundaryMesh()[cyclicPatchLabel_], + dict ).neighbFvPatch().Sf() ), openFraction_(readScalar(dict.lookup("openFraction"))), diff --git a/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C index a0f66f5739cc4e53c2d3b473d3b35e35a0789d30..575490bac424b9ff2df1678c2406638e3327de53 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C @@ -115,7 +115,8 @@ activePressureForceBaffleVelocityFvPatchVectorField initCyclicSf_ = p.boundaryMesh()[cyclicPatchLabel_].Sf(); nbrCyclicSf_ = refCast<const cyclicFvPatch> ( - p.boundaryMesh()[cyclicPatchLabel_] + p.boundaryMesh()[cyclicPatchLabel_], + dict ).neighbFvPatch().Sf(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C index e35b556c480f9a7a352409f9d8a6b714e357eb9b..7c9154c0a00d14b7b3196e28d556c0af2889bbfb 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C @@ -94,7 +94,8 @@ mappedVelocityFluxFixedValueFvPatchField const mappedPatchBase& mpp = refCast<const mappedPatchBase> ( - this->patch().patch() + this->patch().patch(), + dict ); if (mpp.mode() == mappedPolyPatch::NEARESTCELL) { diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclic/cyclicFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclic/cyclicFvsPatchField.C index 15fe2d9df7c8af0e3105c3226014fc59c66ffffe..dab94137f15458398d9d73fba19b7aa366ee0731 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclic/cyclicFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclic/cyclicFvsPatchField.C @@ -48,7 +48,7 @@ Foam::cyclicFvsPatchField<Type>::cyclicFvsPatchField ) : coupledFvsPatchField<Type>(p, iF, dict), - cyclicPatch_(refCast<const cyclicFvPatch>(p)) + cyclicPatch_(refCast<const cyclicFvPatch>(p, dict)) { if (!isA<cyclicFvPatch>(p)) { diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.C index d230e64d5a500c67ce2d20f4deaf134f10230859..86cfbabbf14e4f79b6bfd6b8ad7881fa8d544a18 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.C @@ -72,7 +72,7 @@ Foam::cyclicACMIFvsPatchField<Type>::cyclicACMIFvsPatchField ) : coupledFvsPatchField<Type>(p, iF, dict), - cyclicACMIPatch_(refCast<const cyclicACMIFvPatch>(p)) + cyclicACMIPatch_(refCast<const cyclicACMIFvPatch>(p, dict)) { if (!isA<cyclicACMIFvPatch>(p)) { diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchField.C index 4b92ffe89388b57eaa51b0123fdbc31a7ce3dd3f..1862467aac6dd4457a00ea89b47163df42c67ad7 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchField.C @@ -72,7 +72,7 @@ Foam::cyclicAMIFvsPatchField<Type>::cyclicAMIFvsPatchField ) : coupledFvsPatchField<Type>(p, iF, dict), - cyclicAMIPatch_(refCast<const cyclicAMIFvPatch>(p)) + cyclicAMIPatch_(refCast<const cyclicAMIFvPatch>(p, dict)) { if (!isA<cyclicAMIFvPatch>(p)) { diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.C index a6fa1617905137805b902e85ff30b01202349413..a9f6bd3ca0c158f6f7d530e849fc188c534961d0 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/processor/processorFvsPatchField.C @@ -61,7 +61,7 @@ Foam::processorFvsPatchField<Type>::processorFvsPatchField ) : coupledFvsPatchField<Type>(p, iF, dict), - procPatch_(refCast<const processorFvPatch>(p)) + procPatch_(refCast<const processorFvPatch>(p, dict)) { if (!isType<processorFvPatch>(p)) { diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.C index 0cfa469404acbdda9df35e329264a83ae1bd560f..6f5d10d4cef5a5f30de1daf992f369428d199d0e 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/processorCyclic/processorCyclicFvsPatchField.C @@ -61,7 +61,7 @@ Foam::processorCyclicFvsPatchField<Type>::processorCyclicFvsPatchField ) : coupledFvsPatchField<Type>(p, iF, dict), - procPatch_(refCast<const processorCyclicFvPatch>(p)) + procPatch_(refCast<const processorCyclicFvPatch>(p, dict)) { if (!isType<processorCyclicFvPatch>(p)) { diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.C b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.C index cd4eae9048b56ba739ec754ed1b5ddf5881bd569..434489fed1dae5629a870510a0d4d62baf4ee310 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatchField/cyclicACMIPointPatchField.C @@ -53,7 +53,7 @@ Foam::cyclicACMIPointPatchField<Type>::cyclicACMIPointPatchField ) : coupledPointPatchField<Type>(p, iF, dict), - cyclicACMIPatch_(refCast<const cyclicACMIPointPatch>(p)), + cyclicACMIPatch_(refCast<const cyclicACMIPointPatch>(p, dict)), ppiPtr_(nullptr), nbrPpiPtr_(nullptr) { diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.C b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.C index 2d2d6c524dba0a5965ed5040fae52fdbd818e0c8..64650ab876ac353ce911a76a108eaa1f09daeaf6 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.C @@ -53,7 +53,7 @@ Foam::cyclicAMIPointPatchField<Type>::cyclicAMIPointPatchField ) : coupledPointPatchField<Type>(p, iF, dict), - cyclicAMIPatch_(refCast<const cyclicAMIPointPatch>(p)), + cyclicAMIPatch_(refCast<const cyclicAMIPointPatch>(p, dict)), ppiPtr_(nullptr), nbrPpiPtr_(nullptr) { diff --git a/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C b/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C index b372995659d8cae39ee35d67c69a69de16fc56f7..53ba2236c519677f6da321029d1a82e737c92ba6 100644 --- a/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C +++ b/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C @@ -236,7 +236,7 @@ energyRegionCoupledFvPatchScalarField ) : coupledFvPatchField<scalar>(p, iF, dict), - regionCoupledPatch_(refCast<const regionCoupledBaseFvPatch>(p)), + regionCoupledPatch_(refCast<const regionCoupledBaseFvPatch>(p, dict)), method_(UNDEFINED), nbrThermoPtr_(nullptr), thermoPtr_(nullptr) diff --git a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C index 9895f146bc1ed4d190c3e09ee96a7096b1a378fd..23620a89421c165f858f44fe475e26b497a63dc8 100644 --- a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C +++ b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C @@ -180,7 +180,7 @@ void thermalBaffleFvPatchScalarField::createPatchMesh() } const mappedPatchBase& mpp = - refCast<const mappedPatchBase>(patch().patch()); + refCast<const mappedPatchBase>(patch().patch(), dict_); const word coupleGroup(mpp.coupleGroup());