mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: reduced nesting on return branching
This commit is contained in:
committed by
Andrew Heather
parent
4bc3b2b9cb
commit
60234ab007
@ -423,30 +423,26 @@ Foam::volumeType Foam::dynamicIndexedOctree<Type>::getVolumeType
|
||||
// Content. Defer to shapes.
|
||||
return volumeType(shapes_.getVolumeType(*this, sample));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Empty node. Cannot have 'mixed' as its type since not divided
|
||||
// up and has no items inside it.
|
||||
FatalErrorInFunction
|
||||
<< "Sample:" << sample << " node:" << nodeI
|
||||
<< " with bb:" << nodes_[nodeI].bb_ << nl
|
||||
<< "Empty subnode has invalid volume type MIXED."
|
||||
<< abort(FatalError);
|
||||
|
||||
return volumeType::UNKNOWN;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Empty node. Cannot have 'mixed' as its type since not divided
|
||||
// up and has no items inside it.
|
||||
FatalErrorInFunction
|
||||
<< "Sample:" << sample << " at node:" << nodeI
|
||||
<< " octant:" << octant
|
||||
<< " with bb:" << nod.bb_.subBbox(octant) << nl
|
||||
<< "Node has invalid volume type " << octantType
|
||||
<< "Sample:" << sample << " node:" << nodeI
|
||||
<< " with bb:" << nodes_[nodeI].bb_ << nl
|
||||
<< "Empty subnode has invalid volume type MIXED."
|
||||
<< abort(FatalError);
|
||||
|
||||
return volumeType::UNKNOWN;
|
||||
}
|
||||
|
||||
FatalErrorInFunction
|
||||
<< "Sample:" << sample << " at node:" << nodeI
|
||||
<< " octant:" << octant
|
||||
<< " with bb:" << nod.bb_.subBbox(octant) << nl
|
||||
<< "Node has invalid volume type " << octantType
|
||||
<< abort(FatalError);
|
||||
|
||||
return volumeType::UNKNOWN;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -441,30 +441,26 @@ Foam::volumeType Foam::indexedOctree<Type>::getVolumeType
|
||||
// Content. Defer to shapes.
|
||||
return volumeType(shapes_.getVolumeType(*this, sample));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Empty node. Cannot have 'mixed' as its type since not divided
|
||||
// up and has no items inside it.
|
||||
FatalErrorInFunction
|
||||
<< "Sample:" << sample << " node:" << nodeI
|
||||
<< " with bb:" << nodes_[nodeI].bb_ << nl
|
||||
<< "Empty subnode has invalid volume type MIXED."
|
||||
<< abort(FatalError);
|
||||
|
||||
return volumeType::UNKNOWN;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Empty node. Cannot have 'mixed' as its type since not divided
|
||||
// up and has no items inside it.
|
||||
FatalErrorInFunction
|
||||
<< "Sample:" << sample << " at node:" << nodeI
|
||||
<< " octant:" << octant
|
||||
<< " with bb:" << nod.bb_.subBbox(octant) << nl
|
||||
<< "Node has invalid volume type " << octantType
|
||||
<< "Sample:" << sample << " node:" << nodeI
|
||||
<< " with bb:" << nodes_[nodeI].bb_ << nl
|
||||
<< "Empty subnode has invalid volume type MIXED."
|
||||
<< abort(FatalError);
|
||||
|
||||
return volumeType::UNKNOWN;
|
||||
}
|
||||
|
||||
FatalErrorInFunction
|
||||
<< "Sample:" << sample << " at node:" << nodeI
|
||||
<< " octant:" << octant
|
||||
<< " with bb:" << nod.bb_.subBbox(octant) << nl
|
||||
<< "Node has invalid volume type " << octantType
|
||||
<< abort(FatalError);
|
||||
|
||||
return volumeType::UNKNOWN;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
@ -33,7 +33,7 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(treeDataCell, 0);
|
||||
defineTypeNameAndDebug(treeDataCell, 0);
|
||||
}
|
||||
|
||||
|
||||
@ -178,10 +178,8 @@ bool Foam::treeDataCell::overlaps
|
||||
{
|
||||
return cubeBb.overlaps(bbs_[index]);
|
||||
}
|
||||
else
|
||||
{
|
||||
return cubeBb.overlaps(calcCellBb(cellLabels_[index]));
|
||||
}
|
||||
|
||||
return cubeBb.overlaps(calcCellBb(cellLabels_[index]));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user