diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C index 1d3219972c94e7a83022c0df6f6403a1d711827e..29288940c4b9c1b7b566397b2d7a78788735cd98 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C @@ -3052,7 +3052,7 @@ void Foam::autoLayerDriver::addLayers } } - scalarField invExpansionRatio = 1.0 / expansionRatio; + const scalarField invExpansionRatio(1.0 / expansionRatio); // Add topo regardless of whether extrudeStatus is extruderemove. // Not add layer if patchDisp is zero. diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C index c1c19fa1734db1114947976ee03753c1a0fbf4f3..95fd5ffabecdab9a54587db995063e9b935e301d 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C @@ -652,7 +652,8 @@ Foam::scalarField Foam::autoSnapDriver::calcSnapDistance -GREAT // null value ); - return snapParams.snapTol()*maxEdgeLen; + tmp<scalarField> tfld = snapParams.snapTol()*maxEdgeLen; + return tfld(); } diff --git a/src/meshTools/coordinateSystems/cylindricalCS.C b/src/meshTools/coordinateSystems/cylindricalCS.C index 70f937908119fe31feaa43125e71755e09ce8b74..1be2500f16854b888c807ea0b4a623557863815e 100644 --- a/src/meshTools/coordinateSystems/cylindricalCS.C +++ b/src/meshTools/coordinateSystems/cylindricalCS.C @@ -148,7 +148,7 @@ Foam::tmp<Foam::vectorField> Foam::cylindricalCS::localToGlobal bool translate ) const { - scalarField theta = + scalarField theta ( local.component(vector::Y) *(inDegrees_ ? constant::mathematical::pi/180.0 : 1.0) @@ -170,7 +170,10 @@ Foam::vector Foam::cylindricalCS::globalToLocal bool translate ) const { - const vector lc = coordinateSystem::globalToLocal(global, translate); + const vector lc + ( + coordinateSystem::globalToLocal(global, translate) + ); return vector ( @@ -191,8 +194,10 @@ Foam::tmp<Foam::vectorField> Foam::cylindricalCS::globalToLocal bool translate ) const { - const vectorField lc = - coordinateSystem::globalToLocal(global, translate); + const vectorField lc + ( + coordinateSystem::globalToLocal(global, translate) + ); tmp<vectorField> tresult(new vectorField(lc.size())); vectorField& result = tresult(); diff --git a/src/meshTools/coordinateSystems/sphericalCS.C b/src/meshTools/coordinateSystems/sphericalCS.C index 1bc0b10790f53902bacd4d2a68d9711b8c2de6b6..281316c12e45235bb6de7de44f3914fd4062bddb 100644 --- a/src/meshTools/coordinateSystems/sphericalCS.C +++ b/src/meshTools/coordinateSystems/sphericalCS.C @@ -155,7 +155,7 @@ Foam::tmp<Foam::vectorField> Foam::sphericalCS::localToGlobal bool translate ) const { - const scalarField r = local.component(vector::X); + const scalarField r(local.component(vector::X)); const scalarField theta ( local.component(vector::Y) @@ -206,8 +206,8 @@ Foam::tmp<Foam::vectorField> Foam::sphericalCS::globalToLocal bool translate ) const { - const vectorField lc = coordinateSystem::globalToLocal(global, translate); - const scalarField r = mag(lc); + const vectorField lc(coordinateSystem::globalToLocal(global, translate)); + const scalarField r(mag(lc)); tmp<vectorField> tresult(new vectorField(lc.size())); vectorField& result = tresult(); diff --git a/src/meshTools/coordinateSystems/toroidalCS.C b/src/meshTools/coordinateSystems/toroidalCS.C index d0463acaca60f30fa57b4b4a3c0024ae20bc95f9..f7ce5a2bf8132aa9e342645d3819ea293d12be8f 100644 --- a/src/meshTools/coordinateSystems/toroidalCS.C +++ b/src/meshTools/coordinateSystems/toroidalCS.C @@ -97,15 +97,25 @@ Foam::tmp<Foam::vectorField> Foam::toroidalCS::localToGlobal bool translate ) const { - const scalarField r = local.component(vector::X); + const scalarField r + ( + local.component(vector::X) + ); - const scalarField theta = - local.component(vector::Y)*constant::mathematical::pi/180.0; + const scalarField theta + ( + local.component(vector::Y)*constant::mathematical::pi/180.0 + ); - const scalarField phi = - local.component(vector::Z)*constant::mathematical::pi/180.0; + const scalarField phi + ( + local.component(vector::Z)*constant::mathematical::pi/180.0 + ); - const scalarField rprime = radius_ + r*sin(phi); + const scalarField rprime + ( + radius_ + r*sin(phi) + ); vectorField lc(local.size()); lc.replace(vector::X, rprime*cos(theta)); diff --git a/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C b/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C index 35427e849ff74c6da4fee45e00f4c316d56b669b..fac488acc8113fec4a5ebc3330e48e84698229a2 100644 --- a/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C +++ b/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C @@ -54,10 +54,6 @@ namespace Foam "nearestFace" }; - const NamedEnum<directMappedPatchBase::sampleMode, 3> - directMappedPatchBase::sampleModeNames_; - - template<> const char* Foam::NamedEnum < @@ -70,10 +66,6 @@ namespace Foam "normal" }; - const NamedEnum<directMappedPatchBase::offsetMode, 3> - directMappedPatchBase::offsetModeNames_; - - //- Private class for finding nearest // - point+local index // - sqr(distance)