Skip to content
Snippets Groups Projects
Commit 5016b7f2 authored by andy's avatar andy
Browse files

ENH: Code clean-up

parent ad3e3c0e
No related merge requests found
......@@ -55,21 +55,21 @@ void Foam::fv::interRegionExplicitPorositySource::initialise()
return;
}
fvMesh& nbrMesh =
const_cast<fvMesh&>(mesh_.time().lookupObject<fvMesh>(nbrRegionName_));
cellZoneMesh& cellZones = nbrMesh.cellZones();
const word zoneName(name_ + ".porous");
const fvMesh& nbrMesh = mesh_.time().lookupObject<fvMesh>(nbrRegionName_);
const cellZoneMesh& cellZones = nbrMesh.cellZones();
label zoneID = cellZones.findZoneID(zoneName);
if (zoneID == -1)
{
zoneID = cellZones.size();
cellZoneMesh& cz = const_cast<cellZoneMesh&>(cellZones);
zoneID = cz.size();
cellZones.setSize(zoneID + 1);
cz.setSize(zoneID + 1);
cellZones.set
cz.set
(
zoneID,
new cellZone
......@@ -81,7 +81,7 @@ void Foam::fv::interRegionExplicitPorositySource::initialise()
)
);
cellZones.clearAddressing();
cz.clearAddressing();
}
else
{
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment