Bugfix: Clean up typeid check

This commit is contained in:
Hrvoje Jasak 2016-03-21 11:08:12 +00:00
parent 607b1aa944
commit ec20b32ec8
8 changed files with 18 additions and 17 deletions

View file

@ -122,7 +122,7 @@ bool Foam::engineValveSliding::attached() const
forAll (morphs, modI)
{
if (typeid(morphs[modI]) == typeid(slidingInterface))
if (isA<slidingInterface>(morphs[modI]))
{
result =
result
@ -133,7 +133,7 @@ bool Foam::engineValveSliding::attached() const
// Check thal all sliders are in sync (debug only)
forAll (morphs, modI)
{
if (typeid(morphs[modI]) == typeid(slidingInterface))
if (isA<slidingInterface>(morphs[modI]))
{
if
(

View file

@ -61,7 +61,7 @@ void Foam::layerAR::makeLayersLive()
// Enable layering
forAll (topoChanges, modI)
{
if (typeid(topoChanges[modI]) == typeid(layerAdditionRemoval))
if (isA<layerAdditionRemoval>(topoChanges[modI]))
{
topoChanges[modI].enable();
}

View file

@ -54,7 +54,7 @@ void Foam::layerARGambit::makeLayersLive()
// Enable layering
forAll (topoChanges, modI)
{
if (typeid(topoChanges[modI]) == typeid(layerAdditionRemoval))
if (isA<layerAdditionRemoval>(topoChanges[modI]))
{
topoChanges[modI].enable();
}

View file

@ -55,7 +55,7 @@ void Foam::pistonLayer::makeLayersLive()
// Enable layering
forAll (topoChanges, modI)
{
if (typeid(topoChanges[modI]) == typeid(layerAdditionRemoval))
if (isA<layerAdditionRemoval>(topoChanges[modI]))
{
topoChanges[modI].enable();
}

View file

@ -122,7 +122,7 @@ bool Foam::pistonSliding::attached() const
forAll (morphs, modI)
{
if (typeid(morphs[modI]) == typeid(slidingInterface))
if (isA<slidingInterface>(morphs[modI]))
{
result =
result
@ -133,7 +133,7 @@ bool Foam::pistonSliding::attached() const
// Check thal all sliders are in sync (debug only)
forAll (morphs, modI)
{
if (typeid(morphs[modI]) == typeid(slidingInterface))
if (isA<slidingInterface>(morphs[modI]))
{
if
(

View file

@ -33,6 +33,7 @@ License
#include "mapPolyMesh.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::simpleTwoStroke::makeLayersLive()
{
const polyTopoChanger& morphs = topoChanger_;
@ -40,11 +41,11 @@ void Foam::simpleTwoStroke::makeLayersLive()
// Enable layering
forAll (morphs, modI)
{
if (typeid(morphs[modI]) == typeid(layerAdditionRemoval))
if (isA<layerAdditionRemoval>(morphs[modI]))
{
morphs[modI].enable();
}
else if (typeid(morphs[modI]) == typeid(slidingInterface))
else if (isA<slidingInterface>(morphs[modI]))
{
morphs[modI].disable();
}
@ -65,11 +66,11 @@ void Foam::simpleTwoStroke::makeSlidersLive()
// Enable sliding interface
forAll (morphs, modI)
{
if (typeid(morphs[modI]) == typeid(layerAdditionRemoval))
if (isA<layerAdditionRemoval>(morphs[modI]))
{
morphs[modI].disable();
}
else if (typeid(morphs[modI]) == typeid(slidingInterface))
else if (isA<slidingInterface>(morphs[modI]))
{
morphs[modI].enable();
}
@ -92,7 +93,7 @@ bool Foam::simpleTwoStroke::attached() const
forAll (morphs, modI)
{
if (typeid(morphs[modI]) == typeid(slidingInterface))
if (isA<slidingInterface>(morphs[modI]))
{
result =
result
@ -103,7 +104,7 @@ bool Foam::simpleTwoStroke::attached() const
// Check thal all sliders are in sync (debug only)
forAll (morphs, modI)
{
if (typeid(morphs[modI]) == typeid(slidingInterface))
if (isA<slidingInterface>(morphs[modI]))
{
if
(

View file

@ -122,7 +122,7 @@ bool Foam::thoboisSliding::attached() const
forAll (morphs, modI)
{
if (typeid(morphs[modI]) == typeid(slidingInterface))
if (isA<slidingInterface>(morphs[modI]))
{
result =
result
@ -133,7 +133,7 @@ bool Foam::thoboisSliding::attached() const
// Check thal all sliders are in sync (debug only)
forAll (morphs, modI)
{
if (typeid(morphs[modI]) == typeid(slidingInterface))
if (isA<slidingInterface>(morphs[modI]))
{
if
(

View file

@ -123,7 +123,7 @@ bool Foam::verticalValves::attached() const
forAll (morphs, modI)
{
if (typeid(morphs[modI]) == typeid(slidingInterface))
if (isA<slidingInterface>(morphs[modI]))
{
result =
result
@ -134,7 +134,7 @@ bool Foam::verticalValves::attached() const
// Check thal all sliders are in sync (debug only)
forAll (morphs, modI)
{
if (typeid(morphs[modI]) == typeid(slidingInterface))
if (isA<slidingInterface>(morphs[modI]))
{
if
(