From 41c9243031d266f1060799678876c6f89e812ed8 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Sat, 10 Oct 2015 18:56:29 +0100 Subject: [PATCH] Preparatory clean-up for Pstream --- src/foam/db/IOstreams/Pstreams/Pstream.C | 25 ------------------------ src/foam/db/IOstreams/Pstreams/Pstream.H | 14 ++++++++----- src/foam/global/argList/argList.C | 2 -- 3 files changed, 9 insertions(+), 32 deletions(-) diff --git a/src/foam/db/IOstreams/Pstreams/Pstream.C b/src/foam/db/IOstreams/Pstreams/Pstream.C index bb5e9a97e..4a129190c 100644 --- a/src/foam/db/IOstreams/Pstreams/Pstream.C +++ b/src/foam/db/IOstreams/Pstreams/Pstream.C @@ -625,17 +625,6 @@ Foam::List Foam::Pstream::linearCommunication_(0); Foam::List Foam::Pstream::treeCommunication_(0); -// Should compact transfer be used in which floats replace doubles -// reducing the bandwidth requirement at the expense of some loss -// in accuracy -const Foam::debug::optimisationSwitch -Foam::Pstream::floatTransfer -( - "floatTransfer", - 0 -); - - // Number of processors at which the reduce algorithm changes from linear to // tree const Foam::debug::optimisationSwitch @@ -646,20 +635,6 @@ Foam::Pstream::nProcsSimpleSum ); -// Default commsType -// Foam::Pstream::commsTypes Foam::Pstream::defaultCommsType -// ( -// commsTypeNames -// [ -// debug::optimisationSwitches().lookupOrAddDefault -// ( -// "commsType", -// word("blocking") -// ) -// ] -// ); - - const Foam::debug::optimisationSwitch Foam::Pstream::defaultCommsType ( diff --git a/src/foam/db/IOstreams/Pstreams/Pstream.H b/src/foam/db/IOstreams/Pstreams/Pstream.H index 4b29259cc..ccfbd5be0 100644 --- a/src/foam/db/IOstreams/Pstreams/Pstream.H +++ b/src/foam/db/IOstreams/Pstreams/Pstream.H @@ -222,11 +222,6 @@ public: // Static data - //- Should compact transfer be used in which floats replace doubles - // reducing the bandwidth requirement at the expense of some loss - // in accuracy - static const debug::optimisationSwitch floatTransfer; - //- Number of processors at which the sum algorithm changes from linear // to tree static const debug::optimisationSwitch nProcsSimpleSum; @@ -234,6 +229,15 @@ public: //- Default commsType static const debug::optimisationSwitch defaultCommsType; + //- Default comms with a cast + inline static Pstream::commsTypes defaultComms() + { + return static_cast + ( + Pstream::defaultCommsType() + ); + } + // Constructors diff --git a/src/foam/global/argList/argList.C b/src/foam/global/argList/argList.C index 6fbc5f472..4247648b4 100644 --- a/src/foam/global/argList/argList.C +++ b/src/foam/global/argList/argList.C @@ -633,8 +633,6 @@ Foam::argList::argList { Info<< "Slaves : " << slaveProcs << nl << "Pstream initialized with:" << nl - << " floatTransfer : " - << Pstream::floatTransfer << nl << " nProcsSimpleSum : " << Pstream::nProcsSimpleSum() << nl << " commsType : "