Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Houman Mirzaalian Dastjerdi
waLBerla
Commits
eaf49972
Commit
eaf49972
authored
Jan 25, 2018
by
Michael Kuron
Browse files
Remove boost::function
parent
c0ac624e
Changes
103
Hide whitespace changes
Inline
Side-by-side
apps/benchmarks/ForcesOnSphereNearPlaneInShearFlow/ForcesOnSphereNearPlaneInShearFlow.cpp
View file @
eaf49972
...
...
@@ -576,7 +576,7 @@ int main( int argc, char **argv )
// set up synchronization procedure
const
real_t
overlap
=
real_t
(
1.5
)
*
dx
;
boo
st
::
function
<
void
(
void
)
>
syncCall
=
boost
::
bind
(
pe
::
syncShadowOwners
<
BodyTypeTuple
>
,
boost
::
ref
(
blocks
->
getBlockForest
()),
bodyStorageID
,
static_cast
<
WcTimingTree
*>
(
NULL
),
overlap
,
false
);
st
d
::
function
<
void
(
void
)
>
syncCall
=
boost
::
bind
(
pe
::
syncShadowOwners
<
BodyTypeTuple
>
,
boost
::
ref
(
blocks
->
getBlockForest
()),
bodyStorageID
,
static_cast
<
WcTimingTree
*>
(
NULL
),
overlap
,
false
);
// create pe bodies
...
...
@@ -635,7 +635,7 @@ int main( int argc, char **argv )
///////////////
// setup of the LBM communication for synchronizing the pdf field between neighboring blocks
boo
st
::
function
<
void
()
>
commFunction
;
st
d
::
function
<
void
()
>
commFunction
;
blockforest
::
communication
::
UniformBufferedScheme
<
Stencil_T
>
scheme
(
blocks
);
scheme
.
addPackInfo
(
make_shared
<
lbm
::
PdfFieldPackInfo
<
LatticeModel_T
>
>
(
pdfFieldID
)
);
commFunction
=
scheme
;
...
...
apps/benchmarks/MotionSingleHeavySphere/MotionSingleHeavySphere.cpp
View file @
eaf49972
...
...
@@ -809,7 +809,7 @@ int main( int argc, char **argv )
// set up synchronization procedure
const
real_t
overlap
=
real_t
(
1.5
)
*
dx
;
boo
st
::
function
<
void
(
void
)
>
syncCall
;
st
d
::
function
<
void
(
void
)
>
syncCall
;
if
(
XBlocks
<=
uint_t
(
4
)
)
syncCall
=
boost
::
bind
(
pe
::
syncNextNeighbors
<
BodyTypeTuple
>
,
boost
::
ref
(
blocks
->
getBlockForest
()),
bodyStorageID
,
static_cast
<
WcTimingTree
*>
(
NULL
),
overlap
,
false
);
else
...
...
@@ -949,7 +949,7 @@ int main( int argc, char **argv )
boost
::
filesystem
::
create_directory
(
tpath
);
// setup of the LBM communication for synchronizing the pdf field between neighboring blocks
boo
st
::
function
<
void
()
>
commFunction
;
st
d
::
function
<
void
()
>
commFunction
;
blockforest
::
communication
::
UniformBufferedScheme
<
Stencil_T
>
scheme
(
blocks
);
scheme
.
addPackInfo
(
make_shared
<
lbm
::
PdfFieldPackInfo
<
LatticeModel_T
>
>
(
pdfFieldID
)
);
...
...
apps/benchmarks/UniformGrid/UniformGrid.cpp
View file @
eaf49972
...
...
@@ -495,7 +495,7 @@ struct AddLB
{
// setup of the LB communication for synchronizing the pdf field between neighboring blocks
boo
st
::
function
<
void
()
>
commFunction
;
st
d
::
function
<
void
()
>
commFunction
;
if
(
directComm
)
{
if
(
fullComm
)
...
...
@@ -599,7 +599,7 @@ struct AddLB< LatticeModel_T, typename boost::enable_if_c< boost::mpl::or_<
{
// setup of the LB communication for synchronizing the pdf field between neighboring blocks
boo
st
::
function
<
void
()
>
commFunction
;
st
d
::
function
<
void
()
>
commFunction
;
if
(
directComm
)
{
...
...
apps/showcases/BidisperseFluidizedBed/BidisperseFluidizedBedDPM.cpp
View file @
eaf49972
...
...
@@ -1093,7 +1093,7 @@ int main( int argc, char **argv ) {
/////////////////////////////////
// drag correlation function
boo
st
::
function
<
Vector3
<
real_t
>
(
const
Vector3
<
real_t
>&
,
const
Vector3
<
real_t
>
&
,
real_t
,
real_t
,
real_t
,
real_t
)
>
dragCorrelationFunction
;
st
d
::
function
<
Vector3
<
real_t
>
(
const
Vector3
<
real_t
>&
,
const
Vector3
<
real_t
>
&
,
real_t
,
real_t
,
real_t
,
real_t
)
>
dragCorrelationFunction
;
if
(
dragCorr
==
DragCorrelation
::
ErgunWenYu
)
{
dragCorrelationFunction
=
pe_coupling
::
discrete_particle_methods
::
dragForceErgunWenYu
;
...
...
@@ -1124,7 +1124,7 @@ int main( int argc, char **argv ) {
}
// lift correlation function
boo
st
::
function
<
Vector3
<
real_t
>
(
const
Vector3
<
real_t
>
&
,
const
Vector3
<
real_t
>
&
,
const
Vector3
<
real_t
>
&
,
real_t
,
real_t
,
real_t
)
>
liftCorrelationFunction
;
st
d
::
function
<
Vector3
<
real_t
>
(
const
Vector3
<
real_t
>
&
,
const
Vector3
<
real_t
>
&
,
const
Vector3
<
real_t
>
&
,
real_t
,
real_t
,
real_t
)
>
liftCorrelationFunction
;
if
(
liftCorr
==
LiftCorrelation
::
NoLift
)
{
liftCorrelationFunction
=
pe_coupling
::
discrete_particle_methods
::
noLiftForce
;
...
...
@@ -1139,7 +1139,7 @@ int main( int argc, char **argv ) {
}
// added mass correlation function
boo
st
::
function
<
Vector3
<
real_t
>
(
const
Vector3
<
real_t
>
&
,
const
Vector3
<
real_t
>
&
,
real_t
,
real_t
)
>
addedMassCorrelationFunction
;
st
d
::
function
<
Vector3
<
real_t
>
(
const
Vector3
<
real_t
>
&
,
const
Vector3
<
real_t
>
&
,
real_t
,
real_t
)
>
addedMassCorrelationFunction
;
if
(
addedMassCorr
==
AddedMassCorrelation
::
NoAM
)
{
addedMassCorrelationFunction
=
pe_coupling
::
discrete_particle_methods
::
noAddedMassForce
;
...
...
@@ -1154,7 +1154,7 @@ int main( int argc, char **argv ) {
}
// set up effective viscosity calculation
boo
st
::
function
<
real_t
(
real_t
,
real_t
)
>
effectiveViscosityFunction
;
st
d
::
function
<
real_t
(
real_t
,
real_t
)
>
effectiveViscosityFunction
;
if
(
effVisc
==
EffectiveViscosity
::
None
)
{
effectiveViscosityFunction
=
pe_coupling
::
discrete_particle_methods
::
calculateUnchangedEffectiveViscosity
;
...
...
@@ -1186,7 +1186,7 @@ int main( int argc, char **argv ) {
(
*
bodyVelocityTimeDerivativeEvaluator
)();
// function used to evaluate the interaction force between fluid and particles
boo
st
::
function
<
void
(
void
)
>
dragAndPressureForceEvaluationFunction
;
st
d
::
function
<
void
(
void
)
>
dragAndPressureForceEvaluationFunction
;
if
(
dpm
==
DPMethod
::
GNS
)
{
if
(
interpol
==
Interpolation
::
INearestNeighbor
)
{
if
(
dist
==
Distribution
::
DNearestNeighbor
)
{
...
...
@@ -1251,7 +1251,7 @@ int main( int argc, char **argv ) {
// function to evaluate the lift force contribution
boo
st
::
function
<
void
(
void
)
>
liftForceEvaluationFunction
;
st
d
::
function
<
void
(
void
)
>
liftForceEvaluationFunction
;
if
(
interpol
==
Interpolation
::
INearestNeighbor
)
{
if
(
dist
==
Distribution
::
DNearestNeighbor
)
...
...
@@ -1311,7 +1311,7 @@ int main( int argc, char **argv ) {
}
// function to evaluate the added mass contribution
boo
st
::
function
<
void
(
void
)
>
addedMassEvaluationFunction
;
st
d
::
function
<
void
(
void
)
>
addedMassEvaluationFunction
;
if
(
interpol
==
Interpolation
::
INearestNeighbor
)
{
if
(
dist
==
Distribution
::
DNearestNeighbor
)
...
...
@@ -1371,7 +1371,7 @@ int main( int argc, char **argv ) {
}
// function to evaluate lubrication forces
boo
st
::
function
<
void
(
void
)
>
lubricationEvaluationFunction
;
st
d
::
function
<
void
(
void
)
>
lubricationEvaluationFunction
;
if
(
lubricationCutOffDistance
>
real_t
(
0
)
)
{
typedef
pe_coupling
::
discrete_particle_methods
::
LubricationForceEvaluator
LE_T
;
...
...
apps/tutorials/pe/02_ConfinedGasExtended.cpp
View file @
eaf49972
...
...
@@ -147,7 +147,7 @@ int main( int argc, char ** argv )
cr
.
setGlobalLinearAcceleration
(
Vec3
(
0
,
0
,
0
)
);
WALBERLA_LOG_INFO_ON_ROOT
(
"*** SYNCCALL ***"
);
boo
st
::
function
<
void
(
void
)
>
syncCall
;
st
d
::
function
<
void
(
void
)
>
syncCall
;
if
(
!
syncShadowOwners
)
{
syncCall
=
boost
::
bind
(
pe
::
syncNextNeighbors
<
BodyTuple
>
,
boost
::
ref
(
*
forest
),
storageID
,
&
tt
,
real_c
(
0.0
),
false
);
...
...
@@ -157,7 +157,7 @@ int main( int argc, char ** argv )
}
//! [Bind Sync Call]
boo
st
::
function
<
void
(
void
)
>
syncCallWithoutTT
;
st
d
::
function
<
void
(
void
)
>
syncCallWithoutTT
;
if
(
!
syncShadowOwners
)
{
syncCallWithoutTT
=
boost
::
bind
(
pe
::
syncNextNeighbors
<
BodyTuple
>
,
boost
::
ref
(
*
forest
),
storageID
,
static_cast
<
WcTimingTree
*>
(
NULL
),
real_c
(
0.0
),
false
);
...
...
src/blockforest/Block.cpp
View file @
eaf49972
...
...
@@ -97,7 +97,7 @@ Block::Block( BlockForest & forest, const PhantomBlock & phantom ) :
Block
::
Block
(
BlockForest
&
forest
,
const
BlockID
&
id
,
const
AABB
&
aabb
,
const
uint_t
level
,
mpi
::
RecvBuffer
&
buffer
,
const
boo
st
::
function
<
uint_t
(
const
uint_t
)
>
&
processMapping
)
:
const
st
d
::
function
<
uint_t
(
const
uint_t
)
>
&
processMapping
)
:
IBlock
(
forest
,
aabb
,
id
.
getID
()
),
...
...
src/blockforest/Block.h
View file @
eaf49972
...
...
@@ -77,7 +77,7 @@ public:
const
std
::
vector
<
BlockReconstruction
::
NeighborhoodReconstructionBlock
>
&
neighbors
);
Block
(
BlockForest
&
forest
,
const
PhantomBlock
&
phantom
);
Block
(
BlockForest
&
forest
,
const
BlockID
&
id
,
const
AABB
&
aabb
,
const
uint_t
level
,
mpi
::
RecvBuffer
&
buffer
,
const
boo
st
::
function
<
uint_t
(
const
uint_t
)
>
&
processMapping
=
boo
st
::
function
<
uint_t
(
const
uint_t
)
>
()
);
const
st
d
::
function
<
uint_t
(
const
uint_t
)
>
&
processMapping
=
st
d
::
function
<
uint_t
(
const
uint_t
)
>
()
);
virtual
~
Block
()
{}
...
...
src/blockforest/BlockForest.h
View file @
eaf49972
...
...
@@ -49,16 +49,16 @@ class BlockForest : public BlockStorage
{
public:
typedef
boo
st
::
function
<
void
(
std
::
vector
<
std
::
pair
<
const
Block
*
,
uint_t
>
>
&
minTargetLevels
,
typedef
st
d
::
function
<
void
(
std
::
vector
<
std
::
pair
<
const
Block
*
,
uint_t
>
>
&
minTargetLevels
,
std
::
vector
<
const
Block
*
>
&
blocksAlreadyMarkedForRefinement
,
const
BlockForest
&
forest
)
>
RefreshMinTargetLevelDeterminationFunction
;
typedef
boo
st
::
function
<
void
(
BlockForest
&
forest
,
const
PhantomBlockForest
&
phantomForest
)
>
RefreshCallbackFunction
;
typedef
st
d
::
function
<
void
(
BlockForest
&
forest
,
const
PhantomBlockForest
&
phantomForest
)
>
RefreshCallbackFunction
;
typedef
boo
st
::
function
<
void
(
std
::
vector
<
uint_t
>
&
sendTo
,
std
::
vector
<
uint_t
>
&
recvFrom
)
>
SnapshotCreationFunction
;
typedef
boo
st
::
function
<
uint_t
(
const
uint_t
)
>
SnapshotRestorenFunction
;
typedef
boo
st
::
function
<
void
()
>
SnapshotRestoreCallbackFunction
;
typedef
st
d
::
function
<
void
(
std
::
vector
<
uint_t
>
&
sendTo
,
std
::
vector
<
uint_t
>
&
recvFrom
)
>
SnapshotCreationFunction
;
typedef
st
d
::
function
<
uint_t
(
const
uint_t
)
>
SnapshotRestorenFunction
;
typedef
st
d
::
function
<
void
()
>
SnapshotRestoreCallbackFunction
;
enum
FileIOMode
{
MPI_PARALLEL
,
MASTER_SLAVE
,
SERIALIZED_DISTRIBUTED
};
...
...
@@ -87,7 +87,7 @@ public:
class
RefreshCallbackWrappper
{
public:
typedef
boo
st
::
function
<
void
()
>
Functor_T
;
typedef
st
d
::
function
<
void
()
>
Functor_T
;
RefreshCallbackWrappper
(
const
Functor_T
&
functor
)
:
functor_
(
functor
)
{}
void
operator
()(
BlockForest
&
,
const
PhantomBlockForest
&
)
{
functor_
();
}
private:
...
...
@@ -354,7 +354,7 @@ public:
const
Set
<
SUID
>
&
incompatibleSelectors
=
Set
<
SUID
>::
emptySet
()
);
template
<
typename
T
>
inline
BlockDataID
addBlockData
(
boo
st
::
function
<
T
*
(
IBlock
*
const
block
)
>
function
,
inline
BlockDataID
addBlockData
(
st
d
::
function
<
T
*
(
IBlock
*
const
block
)
>
function
,
const
std
::
string
&
identifier
=
std
::
string
(),
const
Set
<
SUID
>
&
requiredSelectors
=
Set
<
SUID
>::
emptySet
(),
const
Set
<
SUID
>
&
incompatibleSelectors
=
Set
<
SUID
>::
emptySet
()
)
...
...
@@ -452,7 +452,7 @@ public:
void
setRefreshPhantomBlockDataPackFunction
(
const
PhantomBlockForest
::
PhantomBlockDataPackFunction
&
f
)
{
refreshPhantomBlockDataPackFunction_
=
f
;
}
void
setRefreshPhantomBlockDataUnpackFunction
(
const
PhantomBlockForest
::
PhantomBlockDataUnpackFunction
&
f
)
{
refreshPhantomBlockDataUnpackFunction_
=
f
;
}
inline
bool
loadBalancingFunctionRegistered
()
const
{
return
!
refreshPhantomBlockMigrationPreparationFunction_
.
empty
(
);
}
inline
bool
loadBalancingFunctionRegistered
()
const
{
return
static_cast
<
bool
>
(
refreshPhantomBlockMigrationPreparationFunction_
);
}
/// get number of "setRefreshPhantomBlockMigrationPreparationFunction" calls
inline
uint_t
phantomBlockMigrationIterations
()
const
{
return
phantomBlockMigrationIterations_
;
}
...
...
src/blockforest/GlobalLoadBalancing.h
View file @
eaf49972
...
...
@@ -32,7 +32,7 @@
#include
"core/load_balancing/MetisWrapper.h"
#include
"core/math/KahanSummation.h"
#include
<
boost/
function
.hpp
>
#include
<function
al
>
#include
<algorithm>
#include
<list>
...
...
@@ -55,7 +55,7 @@ public:
class
MetisConfiguration
{
public:
typedef
boo
st
::
function
<
memory_t
(
const
BLOCK
*
const
,
const
BLOCK
*
const
)
>
CommunicationFunction
;
typedef
st
d
::
function
<
memory_t
(
const
BLOCK
*
const
,
const
BLOCK
*
const
)
>
CommunicationFunction
;
MetisConfiguration
(
const
bool
_includeMetis
=
false
,
const
bool
_forceMetis
=
false
,
CommunicationFunction
_communicationFunction
=
0
,
const
real_t
_maxUbvec
=
real_c
(
1.5
),
const
uint_t
_iterations
=
uint_c
(
10
)
)
:
...
...
src/blockforest/PhantomBlockForest.cpp
View file @
eaf49972
...
...
@@ -405,7 +405,7 @@ void PhantomBlockForest::migrate( const PhantomBlockDataPackFunction & packBlock
if
(
packBlockData
)
{
WALBERLA_ASSERT
(
unpackBlockData
);
WALBERLA_ASSERT
(
static_cast
<
bool
>
(
unpackBlockData
)
);
packBlockData
(
buffer
,
*
pBlock
);
}
...
...
@@ -483,7 +483,7 @@ void PhantomBlockForest::migrate( const PhantomBlockDataPackFunction & packBlock
if
(
unpackBlockData
)
{
WALBERLA_ASSERT
(
packBlockData
);
WALBERLA_ASSERT
(
static_cast
<
bool
>
(
packBlockData
)
);
boost
::
any
data
;
unpackBlockData
(
buffer
,
*
phantom
,
data
);
phantom
->
addData
(
data
);
...
...
src/blockforest/PhantomBlockForest.h
View file @
eaf49972
...
...
@@ -42,23 +42,23 @@ class PhantomBlockForest
{
public:
typedef
boo
st
::
function
<
Set
<
SUID
>
(
const
std
::
vector
<
std
::
pair
<
BlockID
,
Set
<
SUID
>
>
>
&
source
,
const
BlockID
&
destintation
)
>
typedef
st
d
::
function
<
Set
<
SUID
>
(
const
std
::
vector
<
std
::
pair
<
BlockID
,
Set
<
SUID
>
>
>
&
source
,
const
BlockID
&
destintation
)
>
BlockStateDeterminationFunction
;
typedef
boo
st
::
function
<
void
(
std
::
vector
<
std
::
pair
<
const
PhantomBlock
*
,
boost
::
any
>
>
&
blockData
,
typedef
st
d
::
function
<
void
(
std
::
vector
<
std
::
pair
<
const
PhantomBlock
*
,
boost
::
any
>
>
&
blockData
,
const
PhantomBlockForest
&
phantomForest
)
>
PhantomBlockDataAssignmentFunction
;
/// \param iteration execution counter of this callback
/// \return should the callback rerun after phantom block migration?
typedef
boo
st
::
function
<
bool
(
std
::
vector
<
std
::
pair
<
const
PhantomBlock
*
,
uint_t
>
>
&
targetProcess
,
typedef
st
d
::
function
<
bool
(
std
::
vector
<
std
::
pair
<
const
PhantomBlock
*
,
uint_t
>
>
&
targetProcess
,
std
::
set
<
uint_t
>
&
processesToRecvFrom
,
const
PhantomBlockForest
&
phantomForest
,
const
uint_t
iteration
)
>
MigrationPreparationFunction
;
// = load balancing
typedef
boo
st
::
function
<
void
(
mpi
::
SendBuffer
&
buffer
,
const
PhantomBlock
&
block
)
>
PhantomBlockDataPackFunction
;
typedef
boo
st
::
function
<
void
(
mpi
::
RecvBuffer
&
buffer
,
const
PhantomBlock
&
block
,
boost
::
any
&
data
)
>
PhantomBlockDataUnpackFunction
;
typedef
st
d
::
function
<
void
(
mpi
::
SendBuffer
&
buffer
,
const
PhantomBlock
&
block
)
>
PhantomBlockDataPackFunction
;
typedef
st
d
::
function
<
void
(
mpi
::
RecvBuffer
&
buffer
,
const
PhantomBlock
&
block
,
boost
::
any
&
data
)
>
PhantomBlockDataUnpackFunction
;
...
...
src/blockforest/SetupBlockForest.h
View file @
eaf49972
...
...
@@ -31,7 +31,7 @@
#include
"core/math/AABB.h"
#include
"core/uid/SUID.h"
#include
<
boost/
function
.hpp
>
#include
<function
al
>
#include
<set>
#include
<string>
#include
<vector>
...
...
@@ -45,7 +45,7 @@ class SetupBlockForest : private NonCopyable {
public:
typedef
boo
st
::
function
<
uint_t
(
SetupBlockForest
&
forest
,
const
uint_t
numberOfProcesses
,
const
memory_t
perProcessMemoryLimit
)
>
typedef
st
d
::
function
<
uint_t
(
SetupBlockForest
&
forest
,
const
uint_t
numberOfProcesses
,
const
memory_t
perProcessMemoryLimit
)
>
TargetProcessAssignmentFunction
;
// returns number of processes (may be lower than numberOfProcesses)
...
...
@@ -72,14 +72,14 @@ public:
// Do not use a vector of bool's! Due to the implementation of this vector in the standard library, parallel access to a
// vector of bool's - even on different elements - is not thread-safe!
typedef
boo
st
::
function
<
void
(
std
::
vector
<
uint8_t
>&
excludeBlock
,
const
RootBlockAABB
&
aabb
)
>
RootBlockExclusionFunction
;
typedef
st
d
::
function
<
void
(
std
::
vector
<
uint8_t
>&
excludeBlock
,
const
RootBlockAABB
&
aabb
)
>
RootBlockExclusionFunction
;
typedef
boo
st
::
function
<
void
(
SetupBlockForest
&
forest
)
>
RefinementSelectionFunction
;
typedef
boo
st
::
function
<
void
(
SetupBlockForest
&
forest
)
>
WorkloadMemorySUIDAssignmentFunction
;
typedef
st
d
::
function
<
void
(
SetupBlockForest
&
forest
)
>
RefinementSelectionFunction
;
typedef
st
d
::
function
<
void
(
SetupBlockForest
&
forest
)
>
WorkloadMemorySUIDAssignmentFunction
;
typedef
std
::
vector
<
std
::
pair
<
const
SetupBlock
*
,
const
SetupBlock
*
>
>
CommunicationPairs
;
typedef
std
::
vector
<
real_t
>
CommunicationWeights
;
typedef
boo
st
::
function
<
void
(
const
CommunicationPairs
&
,
CommunicationWeights
&
)
>
CommunicationWeightFunction
;
typedef
st
d
::
function
<
void
(
const
CommunicationPairs
&
,
CommunicationWeights
&
)
>
CommunicationWeightFunction
;
inline
static
void
NullCommunicationWeightFunction
(
const
CommunicationPairs
&
,
CommunicationWeights
&
)
{
...
...
src/blockforest/StructuredBlockForest.h
View file @
eaf49972
...
...
@@ -138,7 +138,7 @@ public:
{
return
blockForest_
->
addBlockData
(
dataHandling
,
identifier
,
requiredSelectors
,
incompatibleSelectors
);
}
template
<
typename
T
>
inline
BlockDataID
addBlockData
(
boo
st
::
function
<
T
*
(
IBlock
*
const
block
)
>
function
,
inline
BlockDataID
addBlockData
(
st
d
::
function
<
T
*
(
IBlock
*
const
block
)
>
function
,
const
std
::
string
&
identifier
=
std
::
string
(),
const
Set
<
SUID
>&
requiredSelectors
=
Set
<
SUID
>::
emptySet
(),
const
Set
<
SUID
>&
incompatibleSelectors
=
Set
<
SUID
>::
emptySet
()
)
...
...
src/blockforest/communication/NonUniformBufferedScheme.h
View file @
eaf49972
...
...
@@ -37,7 +37,7 @@
#include
"core/uid/SUID.h"
#include
<boost/bind.hpp>
#include
<
boost/
function
.hpp
>
#include
<function
al
>
#include
<map>
#include
<set>
...
...
@@ -60,8 +60,8 @@ public:
typedef
mpi
::
RecvBuffer
RecvBuffer
;
typedef
shared_ptr
<
blockforest
::
communication
::
NonUniformPackInfo
>
PackInfo
;
typedef
boo
st
::
function
<
void
()
>
VoidFunction
;
typedef
boo
st
::
function
<
void
(
SendBuffer
&
buffer
)
>
SendBufferFunction
;
typedef
st
d
::
function
<
void
()
>
VoidFunction
;
typedef
st
d
::
function
<
void
(
SendBuffer
&
buffer
)
>
SendBufferFunction
;
//**Construction & Destruction***************************************************************************************
/*! \name Construction & Destruction */
...
...
@@ -110,7 +110,7 @@ public:
//@{
void
startCommunication
()
{
startCommunicateEqualLevel
();
startCommunicateCoarseToFine
();
startCommunicateFineToCoarse
();
}
boo
st
::
function
<
void
()
>
getStartCommunicateFunctor
()
{
return
boost
::
bind
(
&
NonUniformBufferedScheme
::
startCommunication
,
this
);
}
st
d
::
function
<
void
()
>
getStartCommunicateFunctor
()
{
return
boost
::
bind
(
&
NonUniformBufferedScheme
::
startCommunication
,
this
);
}
inline
void
startCommunicateEqualLevel
();
inline
void
startCommunicateCoarseToFine
();
...
...
@@ -121,7 +121,7 @@ public:
inline
void
startCommunicateFineToCoarse
(
const
uint_t
fineLevel
);
void
wait
()
{
waitCommunicateEqualLevel
();
waitCommunicateCoarseToFine
();
waitCommunicateFineToCoarse
();
}
boo
st
::
function
<
void
()
>
getWaitFunctor
()
{
return
boost
::
bind
(
&
NonUniformBufferedScheme
::
wait
,
this
);
}
st
d
::
function
<
void
()
>
getWaitFunctor
()
{
return
boost
::
bind
(
&
NonUniformBufferedScheme
::
wait
,
this
);
}
inline
void
waitCommunicateEqualLevel
();
inline
void
waitCommunicateCoarseToFine
();
...
...
src/blockforest/communication/UniformBufferedScheme.h
View file @
eaf49972
...
...
@@ -39,7 +39,7 @@
#include
"core/uid/SUID.h"
#include
<boost/bind.hpp>
#include
<
boost/
function
.hpp
>
#include
<function
al
>
#include
<map>
#include
<vector>
...
...
@@ -89,8 +89,8 @@ public:
typedef
shared_ptr
<
walberla
::
communication
::
UniformPackInfo
>
PackInfo
;
typedef
boo
st
::
function
<
void
()
>
VoidFunction
;
typedef
boo
st
::
function
<
void
(
SendBuffer
&
buffer
)
>
SendBufferFunction
;
typedef
st
d
::
function
<
void
()
>
VoidFunction
;
typedef
st
d
::
function
<
void
(
SendBuffer
&
buffer
)
>
SendBufferFunction
;
typedef
walberla
::
communication
::
UniformPackInfo
CommunicationItemInfo
;
...
...
@@ -161,8 +161,8 @@ public:
void
startCommunication
();
void
wait
();
boo
st
::
function
<
void
()
>
getStartCommunicateFunctor
();
boo
st
::
function
<
void
()
>
getWaitFunctor
();
st
d
::
function
<
void
()
>
getStartCommunicateFunctor
();
st
d
::
function
<
void
()
>
getWaitFunctor
();
//@}
//*******************************************************************************************************************
...
...
@@ -537,13 +537,13 @@ void UniformBufferedScheme<Stencil>::localBufferUnpacking( const uint_t index, c
}
template
<
typename
Stencil
>
boo
st
::
function
<
void
()
>
UniformBufferedScheme
<
Stencil
>::
getStartCommunicateFunctor
()
st
d
::
function
<
void
()
>
UniformBufferedScheme
<
Stencil
>::
getStartCommunicateFunctor
()
{
return
boost
::
bind
(
&
UniformBufferedScheme
::
startCommunication
,
this
);
}
template
<
typename
Stencil
>
boo
st
::
function
<
void
()
>
UniformBufferedScheme
<
Stencil
>::
getWaitFunctor
()
st
d
::
function
<
void
()
>
UniformBufferedScheme
<
Stencil
>::
getWaitFunctor
()
{
return
boost
::
bind
(
&
UniformBufferedScheme
::
wait
,
this
);
}
...
...
src/blockforest/communication/UniformDirectScheme.h
View file @
eaf49972
...
...
@@ -112,8 +112,8 @@ public:
void
startCommunication
();
void
wait
();
boo
st
::
function
<
void
()
>
getStartCommunicateFunctor
()
{
return
boost
::
bind
(
&
UniformDirectScheme
::
startCommunication
,
this
);
}
boo
st
::
function
<
void
()
>
getWaitFunctor
()
{
return
boost
::
bind
(
&
UniformDirectScheme
::
wait
,
this
);
}
st
d
::
function
<
void
()
>
getStartCommunicateFunctor
()
{
return
boost
::
bind
(
&
UniformDirectScheme
::
startCommunication
,
this
);
}
st
d
::
function
<
void
()
>
getWaitFunctor
()
{
return
boost
::
bind
(
&
UniformDirectScheme
::
wait
,
this
);
}
//@}
//*******************************************************************************************************************
...
...
src/blockforest/loadbalancing/StaticParMetis.h
View file @
eaf49972
...
...
@@ -41,7 +41,7 @@ public:
enum
WeightsToUse
{
PARMETIS_NO_WEIGHTS
=
0
,
PARMETIS_EDGE_WEIGHTS
=
1
,
PARMETIS_VERTEX_WEIGHTS
=
2
,
PARMETIS_BOTH_WEIGHTS
=
3
};
typedef
std
::
pair
<
const
SetupBlock
*
,
const
SetupBlock
*
>
BlockPair
;
typedef
boo
st
::
function
<
void
(
const
std
::
vector
<
BlockPair
>
&
edges
,
std
::
vector
<
int64_t
>
&
weights
)
>
CommWeightFunction
;
typedef
st
d
::
function
<
void
(
const
std
::
vector
<
BlockPair
>
&
edges
,
std
::
vector
<
int64_t
>
&
weights
)
>
CommWeightFunction
;
StaticLevelwiseParMetis
(
const
Algorithm
algorithm
=
PARMETIS_PART_GEOM_KWAY
)
:
algorithm_
(
algorithm
),
weightsToUse_
(
PARMETIS_VERTEX_WEIGHTS
)
{}
...
...
src/core/Abort.h
View file @
eaf49972
...
...
@@ -23,7 +23,7 @@
#include
"core/singleton/Singleton.h"
#include
<
boost/
function
.hpp
>
#include
<function
al
>
#include
<cstdlib>
#include
<sstream>
#include
<stdexcept>
...
...
@@ -40,7 +40,7 @@ class Abort : public singleton::Singleton<Abort>
public:
typedef
boo
st
::
function
<
void
(
const
std
::
string
&
message
,
const
std
::
string
&
callerPath
,
const
int
line
,
bool
withDebugInfo
)
>
AbortFunction
;
typedef
st
d
::
function
<
void
(
const
std
::
string
&
message
,
const
std
::
string
&
callerPath
,
const
int
line
,
bool
withDebugInfo
)
>
AbortFunction
;
void
resetAbortFunction
(
const
AbortFunction
&
function
=
AbortFunction
()
)
{
abortFunction_
=
function
;
}
...
...
src/core/debug/Debug.h
View file @
eaf49972
...
...
@@ -25,7 +25,7 @@
#ifndef NDEBUG
# include "CheckFunctions.h"
# include <
boost/
function
.hpp
>
# include <function
al
>
# include <boost/bind.hpp>
# include <string>
#endif
...
...
@@ -255,12 +255,12 @@ void myAssert(const char * const file, const int line);
class
ConditionalExec
{
public:
ConditionalExec
(
bool
cond
,
const
boo
st
::
function
<
void
(
void
)
>
&
function
)
:
cond_
(
cond
),
function_
(
function
)
{
}
ConditionalExec
(
bool
cond
,
const
st
d
::
function
<
void
(
void
)
>
&
function
)
:
cond_
(
cond
),
function_
(
function
)
{
}
~
ConditionalExec
()
{
if
(
cond_
)
function_
();
}
operator
bool
()
const
{
return
cond_
;
}
private:
bool
cond_
;
boo
st
::
function
<
void
(
void
)
>
function_
;
st
d
::
function
<
void
(
void
)
>
function_
;
};
/// \endcond
...
...
src/core/logging/Logging.h
View file @
eaf49972
...
...
@@ -31,7 +31,7 @@
#include
"core/Regex.h"
#include
<boost/algorithm/string/replace.hpp>
#include
<
boost/
function
.hpp
>
#include
<function
al
>
#include
<cmath>
#include
<fstream>
...
...
Prev
1
2
3
4
5
6
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment