Commit 274610d9 authored by Sebastian Eibl's avatar Sebastian Eibl

clang-tidy -checks=-*,modernize-use-emplace

parent 2d663b74
......@@ -52,7 +52,7 @@ Block::Block( BlockForest & forest, const SetupBlock * const block ) :
for( uint_t i = 0; i != block->getNeighborhoodSize(); ++i )
{
neighborhood_.push_back( Block::NeighborBlock( forest, block->getNeighborId(i), block->getNeighborProcess(i), block->getNeighborState(i) ) );
neighborhood_.emplace_back( forest, block->getNeighborId(i), block->getNeighborProcess(i), block->getNeighborState(i) );
neighborhoodMapping[ block->getNeighborId(i) ] = i;
}
......@@ -222,7 +222,7 @@ void Block::resetNeighborhood( const PhantomBlock & phantom )
neighborhood_.clear();
for( uint_t i = 0; i != phantom.getNeighborhoodSize(); ++i )
{
neighborhood_.push_back( Block::NeighborBlock( forest_, phantom.getNeighborId(i), phantom.getNeighborProcess(i), phantom.getNeighborState(i) ) );
neighborhood_.emplace_back( forest_, phantom.getNeighborId(i), phantom.getNeighborProcess(i), phantom.getNeighborState(i) );
neighborhoodMapping[ phantom.getNeighborId(i) ] = i;
}
......
......@@ -545,7 +545,7 @@ BlockForest::BlockForest( const uint_t process, const char* const filename, cons
state += suidMap[j];
}
neighbors.push_back( BlockReconstruction::NeighborhoodReconstructionBlock( id, process_, state, aabbReconstruction ) );
neighbors.emplace_back( id, process_, state, aabbReconstruction );
}
for( uint_t i = 0; i != numberOfNeighbors; ++i ) {
......@@ -567,7 +567,7 @@ BlockForest::BlockForest( const uint_t process, const char* const filename, cons
state += suidMap[k];
}
neighbors.push_back( BlockReconstruction::NeighborhoodReconstructionBlock( id, neighborProcess, state, aabbReconstruction ) );
neighbors.emplace_back( id, neighborProcess, state, aabbReconstruction );
}
}
......@@ -615,7 +615,7 @@ BlockForest::BlockForest( const uint_t process, const char* const filename, cons
offset = offsetBlocks[ i ] + 2 + j * ( blockIdBytes + suidBytes );
ids.push_back( BlockID( buffer, offset, blockIdBytes ) );
ids.emplace_back( buffer, offset, blockIdBytes );
Set<SUID> state;
boost::dynamic_bitset< uint8_t > suidBitset = byteArrayToBitset( buffer, offset + blockIdBytes, suidBytes );
......@@ -1495,7 +1495,7 @@ void BlockForest::constructBlockInformation()
std::vector< std::pair< BlockID, std::pair< uint_t, Set<SUID> > > > data;
for( auto it = blocks_.begin(); it != blocks_.end(); ++it )
{
data.push_back( std::make_pair( it->first, std::make_pair( process_, it->second->getState() ) ) );
data.emplace_back( it->first, std::make_pair( process_, it->second->getState() ) );
}
mpi::SendBuffer sBuffer;
......@@ -1571,7 +1571,7 @@ bool BlockForest::determineBlockTargetLevels( bool & additionalRefreshCycleRequi
{
WALBERLA_ASSERT( it->second->getTargetLevel() == it->second->getLevel() ||
( it->second->getTargetLevel() + uint_t(1) ) == it->second->getLevel() );
minTargetLevelsCallback.push_back( std::make_pair( it->second.get(), it->second->getTargetLevel() ) );
minTargetLevelsCallback.emplace_back( it->second.get(), it->second->getTargetLevel() );
mapping.push_back(0);
}
}
......@@ -1600,7 +1600,7 @@ bool BlockForest::determineBlockTargetLevels( bool & additionalRefreshCycleRequi
WALBERLA_CHECK( it1 != blocksAlreadyMarkedForRefinement.end() );
WALBERLA_CHECK_NOT_NULLPTR( *it1 );
WALBERLA_CHECK_EQUAL( (*it1)->getTargetLevel(), (*it1)->getLevel() + uint_t(1) );
minTargetLevelsAllBlocks.push_back( std::make_pair( *it1, (*it1)->getTargetLevel() ) );
minTargetLevelsAllBlocks.emplace_back( *it1, (*it1)->getTargetLevel() );
it1++;
}
}
......@@ -2165,7 +2165,7 @@ void BlockForest::update( PhantomBlockForest & phantomForest )
if( block->getTargetLevel() != block->getLevel() || targetProcesses[0] != process_ )
{
WALBERLA_ASSERT( targetProcesses.size() == uint_t(1) || targetProcesses.size() == uint_t(8) );
blocksToPack.push_back( std::make_pair( block.get(), std::vector< mpi::SendBuffer >( targetProcesses.size() ) ) );
blocksToPack.emplace_back( block.get(), std::vector< mpi::SendBuffer >( targetProcesses.size() ) );
}
}
......@@ -2470,7 +2470,7 @@ void BlockForest::update( PhantomBlockForest & phantomForest )
WALBERLA_LOG_PROGRESS( "BlockForest refresh: - perform local data transfer" );
for( auto buffer = localBlocks.begin(); buffer != localBlocks.end(); ++buffer )
recvLocalBlocks.push_back( mpi::RecvBuffer( **buffer ) );
recvLocalBlocks.emplace_back( **buffer );
////////////////////////////////////
// WAIT FOR RECV's FOR BLOCK DATA //
......@@ -2601,7 +2601,7 @@ void BlockForest::update( PhantomBlockForest & phantomForest )
std::vector< std::pair< Block *, std::vector< std::pair< Set<SUID>, mpi::RecvBuffer * > > > > dataToUnpack;
for( auto it = blocksToUnpack.begin(); it != blocksToUnpack.end(); ++it )
dataToUnpack.push_back( std::make_pair( it->first, it->second ) );
dataToUnpack.emplace_back( it->first, it->second );
//#ifdef _OPENMP
//#pragma omp parallel for schedule(dynamic)
......
......@@ -238,7 +238,7 @@ void PhantomBlockForest::initialize( const BlockStateDeterminationFunction & fun
std::map< BlockID, std::pair< uint_t, Set<SUID> > > & localMap = blockNeighborhood[ process ];
for( auto it = localMap.begin(); it != localMap.end(); ++it )
neighbors.push_back( BlockReconstruction::NeighborhoodReconstructionBlock( it->first, it->second.first, it->second.second, aabbReconstruction ) );
neighbors.emplace_back( it->first, it->second.first, it->second.second, aabbReconstruction );
BlockReconstruction::NeighborhoodReconstruction< PhantomBlock > neighborhoodReconstruction( blockforest_.getDomain(),
blockforest_.isXPeriodic(),
......@@ -263,7 +263,7 @@ void PhantomBlockForest::assignBlockData( const PhantomBlockDataAssignmentFuncti
{
auto & block = it->second;
WALBERLA_ASSERT_NOT_NULLPTR( block.get() );
blockData.push_back( std::make_pair( block.get(), walberla::any() ) );
blockData.emplace_back( block.get(), walberla::any() );
}
function( blockData, *this );
......@@ -297,7 +297,7 @@ bool PhantomBlockForest::calculateMigrationInformation( const MigrationPreparati
{
auto & block = it->second;
WALBERLA_ASSERT_NOT_NULLPTR( block.get() );
targetProcess.push_back( std::make_pair( block.get(), block->getTargetProcess() ) );
targetProcess.emplace_back( block.get(), block->getTargetProcess() );
}
bool runAgain = function( targetProcess, processesToRecvFrom_, *this, iteration );
......
......@@ -114,7 +114,7 @@ uint_t StaticLevelwiseParMetis::operator()( SetupBlockForest & forest, const uin
if(weightsToUse_ == PARMETIS_EDGE_WEIGHTS || weightsToUse_ == PARMETIS_BOTH_WEIGHTS)
{
blockPairs.push_back( BlockPair( blocks[i], *nit ) );
blockPairs.emplace_back( blocks[i], *nit );
}
}
......
......@@ -194,7 +194,7 @@ void StructuredBlockStorage::resetCellDecomposition( const std::vector< uint_t >
WALBERLA_ASSERT_GREATER( yCells[i], 0 );
WALBERLA_ASSERT_GREATER( zCells[i], 0 );
domainCellBB_.push_back( CellInterval( 0, 0, 0, cell_idx_c( xCells[i]-1 ), cell_idx_c( yCells[i]-1 ), cell_idx_c( zCells[i]-1 ) ) );
domainCellBB_.emplace_back( 0, 0, 0, cell_idx_c( xCells[i]-1 ), cell_idx_c( yCells[i]-1 ), cell_idx_c( zCells[i]-1 ) );
dx_.push_back( xWidth / real_c( xCells[i] ) );
dy_.push_back( yWidth / real_c( yCells[i] ) );
......
......@@ -34,9 +34,9 @@ namespace pe {
std::vector< DefaultBodyVTKOutput::Attributes > DefaultBodyVTKOutput::getAttributes() const
{
std::vector< Attributes > attributes;
attributes.push_back( Attributes( vtk::typeToString< float >(), "Velocity", uint_c(3) ) );
attributes.push_back( Attributes( vtk::typeToString< int >(), "rank", uint_c(1) ) );
attributes.push_back( Attributes( vtk::typeToString< int >(), "shadow", uint_c(1) ) );
attributes.emplace_back( vtk::typeToString< float >(), "Velocity", uint_c(3) );
attributes.emplace_back( vtk::typeToString< int >(), "rank", uint_c(1) );
attributes.emplace_back( vtk::typeToString< int >(), "shadow", uint_c(1) );
return attributes;
}
......
......@@ -32,12 +32,12 @@ namespace pe {
std::vector< EllipsoidVtkOutput::Attributes > EllipsoidVtkOutput::getAttributes() const
{
std::vector< Attributes > attributes;
attributes.push_back( Attributes( vtk::typeToString< float >(), "mass", uint_c(1) ) );
attributes.push_back( Attributes( vtk::typeToString< float >(), "tensorGlyph", uint_c(6) ) );
attributes.push_back( Attributes( vtk::typeToString< float >(), "velocity", uint_c(3) ) );
attributes.push_back( Attributes( vtk::typeToString< int >(), "rank", uint_c(1) ) );
attributes.push_back( Attributes( vtk::typeToString< id_t >(), "id", uint_c(1) ) );
attributes.push_back( Attributes( vtk::typeToString< id_t >(), "uid", uint_c(1) ) );
attributes.emplace_back( vtk::typeToString< float >(), "mass", uint_c(1) );
attributes.emplace_back( vtk::typeToString< float >(), "tensorGlyph", uint_c(6) );
attributes.emplace_back( vtk::typeToString< float >(), "velocity", uint_c(3) );
attributes.emplace_back( vtk::typeToString< int >(), "rank", uint_c(1) );
attributes.emplace_back( vtk::typeToString< id_t >(), "id", uint_c(1) );
attributes.emplace_back( vtk::typeToString< id_t >(), "uid", uint_c(1) );
return attributes;
}
......
......@@ -35,13 +35,13 @@ namespace pe {
std::vector< SphereVtkOutput::Attributes > SphereVtkOutput::getAttributes() const
{
std::vector< Attributes > attributes;
attributes.push_back( Attributes( vtk::typeToString< float >(), "mass", uint_c(1) ) );
attributes.push_back( Attributes( vtk::typeToString< float >(), "radius", uint_c(1) ) );
attributes.push_back( Attributes( vtk::typeToString< float >(), "velocity", uint_c(3) ) );
attributes.push_back( Attributes( vtk::typeToString< float >(), "orientation", uint_c(3) ) );
attributes.push_back( Attributes( vtk::typeToString< int >(), "rank", uint_c(1) ) );
attributes.push_back( Attributes( vtk::typeToString< id_t >(), "id", uint_c(1) ) );
attributes.push_back( Attributes( vtk::typeToString< id_t >(), "uid", uint_c(1) ) );
attributes.emplace_back( vtk::typeToString< float >(), "mass", uint_c(1) );
attributes.emplace_back( vtk::typeToString< float >(), "radius", uint_c(1) );
attributes.emplace_back( vtk::typeToString< float >(), "velocity", uint_c(3) );
attributes.emplace_back( vtk::typeToString< float >(), "orientation", uint_c(3) );
attributes.emplace_back( vtk::typeToString< int >(), "rank", uint_c(1) );
attributes.emplace_back( vtk::typeToString< id_t >(), "id", uint_c(1) );
attributes.emplace_back( vtk::typeToString< id_t >(), "uid", uint_c(1) );
return attributes;
}
......
......@@ -60,7 +60,7 @@ void mapPSMBodyAndVolumeFraction( const pe::BodyID body, IBlock & block, Structu
// if the cell intersected with the body, store a pointer to that body and the corresponding volume fraction in the field
if( fraction > real_t(0) )
{
bodyAndVolumeFractionField->get(cell).push_back( BodyAndVolumeFraction_T( body, fraction ) );
bodyAndVolumeFractionField->get(cell).emplace_back( body, fraction );
}
}
}
......@@ -219,7 +219,7 @@ void BodyAndVolumeFractionMapping::updatePSMBodyAndVolumeFraction( pe::BodyID bo
// if the cell intersected with the body, store a pointer to that body and the corresponding volume fraction in the field
if( fraction > real_t(0) )
{
updatedBodyAndVolumeFractionField_->get(x,y,z).push_back( BodyAndVolumeFraction_T( body, fraction ) );
updatedBodyAndVolumeFractionField_->get(x,y,z).emplace_back( body, fraction );
}
}
}
......
......@@ -85,7 +85,7 @@ namespace timeloop {
void PerformanceMeter::addMeasurement ( const std::string & name, CountFunction countFunction,
uint_t countFreq, real_t scaling )
{
measurements_.push_back( Measurement( countFunction, name, scaling, countFreq ) );
measurements_.emplace_back( countFunction, name, scaling, countFreq );
uint_t cells = 0;
for( auto block = blockStorage_.begin(); block != blockStorage_.end(); ++block )
cells += countFunction( *block );
......@@ -105,7 +105,7 @@ namespace timeloop {
*******************************************************************************************************************/
void PerformanceMeter::addMeasurement ( const std::string & name, real_t scaling )
{
measurements_.push_back( Measurement( CountFunction(), name, scaling, uint_t(0) ) );
measurements_.emplace_back( CountFunction(), name, scaling, uint_t(0) );
uint_t cellsOnProcess = 0;
for( auto block = blockStorage_.begin(); block != blockStorage_.end(); ++block )
......
......@@ -138,7 +138,7 @@ Timeloop::FctHandle
Timeloop::addFuncBeforeTimeStep(const VoidFctNoArguments& f, const std::string & id,
const Set<SUID> & r, const Set<SUID> & e )
{
beforeFunctions_.push_back( SelectableFunc(f,r,e,id) );
beforeFunctions_.emplace_back(f,r,e,id );
return beforeFunctions_.size() - 1;
}
......@@ -157,7 +157,7 @@ Timeloop::FctHandle
Timeloop::addFuncAfterTimeStep(const VoidFctNoArguments& f, const std::string & id,
const Set<SUID> & r, const Set<SUID> & e )
{
afterFunctions_.push_back( SelectableFunc(f,r,e,id) );
afterFunctions_.emplace_back(f,r,e,id );
return afterFunctions_.size() - 1;
}
......
......@@ -1240,9 +1240,9 @@ void VTKOutput::writeVTUPiece( std::ostream& ofs, const IBlock& block, const Cel
{
vimap[v] = numeric_cast< Index >(vc.size());
ci.push_back(numeric_cast< Index >(vc.size()));
vc.push_back(VertexCoord((x == 0) ? aabb.xMin() : aabb.xMax(),
vc.emplace_back((x == 0) ? aabb.xMin() : aabb.xMax(),
(y == 0) ? aabb.yMin() : aabb.yMax(),
(z == 0) ? aabb.zMin() : aabb.zMax()));
(z == 0) ? aabb.zMin() : aabb.zMax());
}
}
}
......@@ -1329,9 +1329,9 @@ void VTKOutput::writeVTUPiece_sampling(std::ostream& ofs, const IBlock& block, c
{
vimap[v] = numeric_cast< Index >(vc.size());
ci.push_back(numeric_cast< Index >(vc.size()));
vc.push_back(VertexCoord((x == 0) ? cell->aabb_.xMin() : cell->aabb_.xMax(),
vc.emplace_back((x == 0) ? cell->aabb_.xMin() : cell->aabb_.xMax(),
(y == 0) ? cell->aabb_.yMin() : cell->aabb_.yMax(),
(z == 0) ? cell->aabb_.zMin() : cell->aabb_.zMax()));
(z == 0) ? cell->aabb_.zMin() : cell->aabb_.zMax());
}
}
}
......
......@@ -86,7 +86,7 @@ static void workloadMemorySUIDAssignmentFunction( SetupBlockForest& forest ) {
for( uint_t i = 0; i != forest.getNumberOfLevels(); ++i ) {
std::ostringstream oss;
oss << "Level_" << i;
suids.push_back( SUID( oss.str(), false ) );
suids.emplace_back( oss.str(), false );
}
for( uint_t i = 0; i != blocks.size(); ++i ) {
......
......@@ -113,39 +113,39 @@ int main( int argc, char** argv )
WALBERLA_UNUSED(env);
std::vector< Vector3<real_t> > points;
points.push_back( Vector3<real_t>(0,0,0) );
points.push_back( Vector3<real_t>(1,0,0) );
points.push_back( Vector3<real_t>(0,1,0) );
points.push_back( Vector3<real_t>(1,1,0) );
points.push_back( Vector3<real_t>(0,0,1) );
points.push_back( Vector3<real_t>(1,0,1) );
points.push_back( Vector3<real_t>(0,1,1) );
points.push_back( Vector3<real_t>(1,1,1) );
points.emplace_back( real_t(0), real_t(0), real_t(0) );
points.emplace_back( real_t(1), real_t(0), real_t(0) );
points.emplace_back( real_t(0), real_t(1), real_t(0) );
points.emplace_back( real_t(1), real_t(1), real_t(0) );
points.emplace_back( real_t(0), real_t(0), real_t(1) );
points.emplace_back( real_t(1), real_t(0), real_t(1) );
points.emplace_back( real_t(0), real_t(1), real_t(1) );
points.emplace_back( real_t(1), real_t(1), real_t(1) );
auto correctPointIt = points.begin();
for (auto it = SCIterator(AABB(real_c(-0.01), real_c(-0.01), real_c(-0.01), real_c(1.9),real_c(1.9),real_c(1.9)), Vector3<real_t>(0,0,0), 1); it != SCIterator(); ++it, ++correctPointIt)
WALBERLA_CHECK_FLOAT_EQUAL( *it, *correctPointIt, (*it) << "!=" << (*correctPointIt) );
points.clear();
points.push_back( Vector3<real_t>(0,0,0) );
points.push_back( Vector3<real_t>(1,0,0) );
points.push_back( Vector3<real_t>(real_c(0.5), real_c(0.866025),0) );
points.push_back( Vector3<real_t>(real_c(1.5), real_c(0.866025),0) );
points.push_back( Vector3<real_t>(0, real_c(1.73205),0) );
points.push_back( Vector3<real_t>(1, real_c(1.73205),0) );
points.push_back( Vector3<real_t>(real_c(0.5), real_c(0.288675), real_c(0.816497)) );
points.push_back( Vector3<real_t>(real_c(1.5), real_c(0.288675), real_c(0.816497)) );
points.push_back( Vector3<real_t>(0, real_c(1.1547), real_c(0.816497)) );
points.push_back( Vector3<real_t>(1, real_c(1.1547), real_c(0.816497)) );
points.push_back( Vector3<real_t>(0,0, real_c(1.63299) ) );
points.push_back( Vector3<real_t>(1,0, real_c(1.63299) ) );
points.push_back( Vector3<real_t>(real_c(0.5), real_c(0.866025), real_c(1.63299) ) );
points.push_back( Vector3<real_t>(real_c(1.5), real_c(0.866025), real_c(1.63299) ) );
points.push_back( Vector3<real_t>(0, real_c(1.73205), real_c(1.63299) ) );
points.push_back( Vector3<real_t>(1, real_c(1.73205), real_c(1.63299) ) );
points.emplace_back(real_t(0),real_t(0),real_t(0) );
points.emplace_back(real_t(1),real_t(0),real_t(0) );
points.emplace_back(real_c(0.5), real_c(0.866025),real_t(0) );
points.emplace_back(real_c(1.5), real_c(0.866025),real_t(0) );
points.emplace_back(real_t(0), real_c(1.73205),real_t(0) );
points.emplace_back(real_t(1), real_c(1.73205),real_t(0) );
points.emplace_back(real_c(0.5), real_c(0.288675), real_c(0.816497) );
points.emplace_back(real_c(1.5), real_c(0.288675), real_c(0.816497) );
points.emplace_back(real_t(0), real_c(1.1547), real_c(0.816497) );
points.emplace_back(real_t(1), real_c(1.1547), real_c(0.816497) );
points.emplace_back(real_t(0),real_t(0), real_c(1.63299) );
points.emplace_back(real_t(1),real_t(0), real_c(1.63299) );
points.emplace_back(real_c(0.5), real_c(0.866025), real_c(1.63299) );
points.emplace_back(real_c(1.5), real_c(0.866025), real_c(1.63299) );
points.emplace_back(real_t(0), real_c(1.73205), real_c(1.63299) );
points.emplace_back(real_t(1), real_c(1.73205), real_c(1.63299) );
correctPointIt = points.begin();
for (auto it = HCPIterator(AABB(real_c(-0.01), real_c(-0.01), real_c(-0.01), real_c(1.9),real_c(1.9),real_c(1.9)), Vector3<real_t>(0,0,0), 1); it != HCPIterator(); ++it, ++correctPointIt)
for (auto it = HCPIterator(AABB(real_c(-0.01), real_c(-0.01), real_c(-0.01), real_c(1.9),real_c(1.9),real_c(1.9)), Vector3<real_t>(real_t(0),real_t(0),real_t(0)), 1); it != HCPIterator(); ++it, ++correctPointIt)
{
WALBERLA_CHECK( floatIsEqual((*it)[0], (*correctPointIt)[0], real_c(0.00001)), (*it) << "!=" << (*correctPointIt));
WALBERLA_CHECK( floatIsEqual((*it)[1], (*correctPointIt)[1], real_c(0.00001)), (*it) << "!=" << (*correctPointIt));
......
......@@ -81,23 +81,23 @@ int equationInput(){
std::vector<std::string> eqStringList;
//// Parameters
eqStringList.push_back( "dt = 2e-7");
eqStringList.push_back( "dx = 5e-6");
eqStringList.push_back( "eta = 0.0001");
eqStringList.push_back( "omega = 1.95");
eqStringList.push_back( "rho = 1000");
eqStringList.emplace_back("dt = 2e-7");
eqStringList.emplace_back("dx = 5e-6");
eqStringList.emplace_back("eta = 0.0001");
eqStringList.emplace_back("omega = 1.95");
eqStringList.emplace_back("rho = 1000");
//// LBM Equations
eqStringList.push_back( "'rho_L' = 1.0");
eqStringList.push_back( "'dt_L' = 1.0");
eqStringList.push_back( "'dx_L' = 1.0");
eqStringList.push_back( "'c' = 'dx_L' / 'dt_L'");
eqStringList.push_back( "'nu' = 'eta' / 'rho'");
eqStringList.push_back( "'nu_L' = 'eta_L' / 'rho_L'");
eqStringList.push_back( "'dt' = ( 0.1 * 'dx' ) / 'maxOcurringPhysVel'");
eqStringList.push_back( "'cs' = ( 1.0 / ( 3.0 ^ 0.5 ) ) * 'c'");
eqStringList.push_back( "'omega' = 1.0 / 'tau'");
eqStringList.push_back( "'nu_L' = ( 'cs' ^ 2.0 ) * ( 'tau' - ( 0.5 * 'dt_L' ) )");
eqStringList.emplace_back("'rho_L' = 1.0");
eqStringList.emplace_back("'dt_L' = 1.0");
eqStringList.emplace_back("'dx_L' = 1.0");
eqStringList.emplace_back("'c' = 'dx_L' / 'dt_L'");
eqStringList.emplace_back("'nu' = 'eta' / 'rho'");
eqStringList.emplace_back("'nu_L' = 'eta_L' / 'rho_L'");
eqStringList.emplace_back("'dt' = ( 0.1 * 'dx' ) / 'maxOcurringPhysVel'");
eqStringList.emplace_back("'cs' = ( 1.0 / ( 3.0 ^ 0.5 ) ) * 'c'");
eqStringList.emplace_back("'omega' = 1.0 / 'tau'");
eqStringList.emplace_back("'nu_L' = ( 'cs' ^ 2.0 ) * ( 'tau' - ( 0.5 * 'dt_L' ) )");
/*
// Unsolvable:
// Parameters
......
......@@ -103,7 +103,7 @@ void testStrings()
std::vector< std::string > reducedValuesUnion = mpi::allReduceSet( values, mpi::UNION );
values.push_back( "GRAPES" );
values.emplace_back("GRAPES" );
std::vector< std::string > reducedValuesIntersection = mpi::allReduceSet( values, mpi::INTERSECTION );
if( numProcesses == 1 )
......
......@@ -64,21 +64,21 @@ int main( int /*argc*/, char** /*argv*/ ) {
container.get( functions, A(1)+A(2)+A(3) );
expected.clear();
expected.push_back("function_1");
expected.push_back("function_5");
expected.emplace_back("function_1");
expected.emplace_back("function_5");
WALBERLA_CHECK_EQUAL( functions, expected );
WALBERLA_CHECK_EQUAL( container.get( function, A(1)+A(2)+A(3)+A(4) ), static_cast< size_t >(1) );
expected.clear();
expected.push_back("function_4");
expected.emplace_back("function_4");
WALBERLA_CHECK_EQUAL( function, expected[0] );
WALBERLA_CHECK_EQUAL( container.get( function, A(1)+A(2) ), static_cast< size_t >(1) );
expected.clear();
expected.push_back("function_3");
expected.emplace_back("function_3");
WALBERLA_CHECK_EQUAL( function, expected[0] );
WALBERLA_CHECK_EQUAL( container.get( function, A(1)+A(2)+A(3)+A(5)+A(6)+A(7) ), static_cast< size_t >(3) );
......@@ -87,16 +87,16 @@ int main( int /*argc*/, char** /*argv*/ ) {
container.get( functions, A(1)+A(2)+A(3)+A(5)+A(6)+A(7) );
expected.clear();
expected.push_back("function_1");
expected.push_back("function_2");
expected.push_back("function_5");
expected.emplace_back("function_1");
expected.emplace_back("function_2");
expected.emplace_back("function_5");
WALBERLA_CHECK_EQUAL( functions, expected );
WALBERLA_CHECK_EQUAL( container.get( function, A(1)+A(2)+A(3)+A(4)+A(5)+A(6)+A(7) ), static_cast< size_t >(1) );
expected.clear();
expected.push_back("function_4");
expected.emplace_back("function_4");
WALBERLA_CHECK_EQUAL( function, expected[0] );
WALBERLA_CHECK_EQUAL( container.get( function, A(3)+A(5)+A(6) ), static_cast< size_t >(2) );
......@@ -105,27 +105,27 @@ int main( int /*argc*/, char** /*argv*/ ) {
container.get( functions, A(3)+A(5)+A(6) );
expected.clear();
expected.push_back("function_6");
expected.push_back("function_7");
expected.emplace_back("function_6");
expected.emplace_back("function_7");
WALBERLA_CHECK_EQUAL( functions, expected );
WALBERLA_CHECK_EQUAL( container.get( function, A(1)+A(5)+A(6) ), static_cast< size_t >(1) );
expected.clear();
expected.push_back("function_7");
expected.emplace_back("function_7");
WALBERLA_CHECK_EQUAL( function, expected[0] );
WALBERLA_CHECK_EQUAL( container.get( function, A(4)+A(5)+A(6) ), static_cast< size_t >(1) );
expected.clear();
expected.push_back("function_6");
expected.emplace_back("function_6");
WALBERLA_CHECK_EQUAL( function, expected[0] );
WALBERLA_CHECK_EQUAL( container.get( function, A(7)+A(5)+A(6) ), static_cast< size_t >(1) );
expected.clear();
expected.push_back("function_2");
expected.emplace_back("function_2");
WALBERLA_CHECK_EQUAL( function, expected[0] );
functions.clear();
......@@ -133,13 +133,13 @@ int main( int /*argc*/, char** /*argv*/ ) {
functions.push_back( *it );
expected.clear();
expected.push_back("function_1");
expected.push_back("function_2");
expected.push_back("function_3");
expected.push_back("function_4");
expected.push_back("function_5");
expected.push_back("function_6");
expected.push_back("function_7");
expected.emplace_back("function_1");
expected.emplace_back("function_2");
expected.emplace_back("function_3");
expected.emplace_back("function_4");
expected.emplace_back("function_5");
expected.emplace_back("function_6");
expected.emplace_back("function_7");
WALBERLA_CHECK_EQUAL( functions, expected );
......
......@@ -65,14 +65,14 @@ void registerTest()
WALBERLA_CHECK(overFlow);
vector<string> names;
names.push_back("Flag1");
names.push_back("Flag2");
names.push_back("Flag3");
names.push_back("Flag4");
names.push_back("Flag5");
names.push_back("Flag6");
names.push_back("Flag7");
names.push_back("Flag8");
names.emplace_back("Flag1");
names.emplace_back("Flag2");
names.emplace_back("Flag3");
names.emplace_back("Flag4");
names.emplace_back("Flag5");
names.emplace_back("Flag6");
names.emplace_back("Flag7");
names.emplace_back("Flag8");
for(size_t i=0; i<names.size(); ++i)
{
......
......@@ -363,7 +363,7 @@ int main( int argc, char ** argv )
// D3Q19, incompressible //
///////////////////////////
fieldIds.push_back( std::vector< BlockDataID >() );
fieldIds.emplace_back( );
// SRT
......@@ -490,7 +490,7 @@ int main( int argc, char ** argv )
// D3Q19, compressible //
/////////////////////////
fieldIds.push_back( std::vector< BlockDataID >() );
fieldIds.emplace_back( );
// SRT
......@@ -553,7 +553,7 @@ int main( int argc, char ** argv )
// D3Q27, incompressible //
///////////////////////////
fieldIds.push_back( std::vector< BlockDataID >() );
fieldIds.emplace_back( );
// SRT
......@@ -616,7 +616,7 @@ int main( int argc, char ** argv )
// D3Q27, compressible //
/////////////////////////
fieldIds.push_back( std::vector< BlockDataID >() );
fieldIds.emplace_back( );
// SRT
......@@ -651,7 +651,7 @@ int main( int argc, char ** argv )
// TRT <-> MRT COMPARISON //
////////////////////////////
fieldIds.push_back( std::vector< BlockDataID >() );
fieldIds.emplace_back( );
// TRT
......@@ -703,7 +703,7 @@ int main( int argc, char ** argv )
// D2Q9, incompressible //
//////////////////////////
fieldIds.push_back( std::vector< BlockDataID >() );
fieldIds.emplace_back( );
// SRT
......
......@@ -172,16 +172,16 @@ BlockDataID initBoundaryHandling( shared_ptr<StructuredBlockForest> & blocks, co
const real_t r = real_c(std::sqrt(real_c(3))) / real_c(4) * L * setup.kappa;
// spheres in all eight corners of the domain
spheres.push_back( geometry::Sphere( Vector3<real_t>( 0, 0, 0 ), r ) );
spheres.push_back( geometry::Sphere( Vector3<real_t>( L, 0, 0 ), r ) );
spheres.push_back( geometry::Sphere( Vector3<real_t>( 0, L, 0 ), r ) );
spheres.push_back( geometry::Sphere( Vector3<real_t>( 0, 0, L ), r ) );
spheres.push_back( geometry::Sphere( Vector3<real_t>( L, L, 0 ), r ) );
spheres.push_back( geometry::Sphere( Vector3<real_t>( L, 0, L ), r ) );
spheres.push_back( geometry::Sphere( Vector3<real_t>( 0, L, L ), r ) );
spheres.push_back( geometry::Sphere( Vector3<real_t>( L, L, L ), r ) );
spheres.emplace_back( Vector3<real_t>( 0, 0, 0 ), r );
spheres.emplace_back( Vector3<real_t>( L, 0, 0 ), r );
spheres.emplace_back( Vector3<real_t>( 0, L, 0 ), r );
spheres.emplace_back( Vector3<real_t>( 0, 0, L ), r );
spheres.emplace_back( Vector3<real_t>( L, L, 0 ), r );
spheres.emplace_back( Vector3<real_t>( L, 0, L ), r );
spheres.emplace_back( Vector3<real_t>( 0, L, L ), r );
spheres.emplace_back( Vector3<real_t>( L, L, L ), r );
// and one sphere in the middle
spheres.push_back( geometry::Sphere( Vector3<real_t>( L / real_c(2), L / real_c(2), L / real_c(2) ), r ) );
spheres.emplace_back( Vector3<real_t>( L / real_c(2), L / real_c(2), L / real_c(2) ), r );