@@ -243,7 +243,6 @@ PatchKernel::PatchKernel(const PatchKernel &other)
243
243
m_boxMaxCounter(other.m_boxMaxCounter),
244
244
m_adjacenciesBuildStrategy(other.m_adjacenciesBuildStrategy),
245
245
m_interfacesBuildStrategy(other.m_interfacesBuildStrategy),
246
- m_spawnStatus(other.m_spawnStatus),
247
246
m_adaptionMode(other.m_adaptionMode),
248
247
m_adaptionStatus(other.m_adaptionStatus),
249
248
m_dimension(other.m_dimension),
@@ -330,7 +329,6 @@ PatchKernel::PatchKernel(PatchKernel &&other)
330
329
m_boxMaxCounter(std::move(other.m_boxMaxCounter)),
331
330
m_adjacenciesBuildStrategy(std::move(other.m_adjacenciesBuildStrategy)),
332
331
m_interfacesBuildStrategy(std::move(other.m_interfacesBuildStrategy)),
333
- m_spawnStatus(std::move(other.m_spawnStatus)),
334
332
m_adaptionMode(std::move(other.m_adaptionMode)),
335
333
m_adaptionStatus(std::move(other.m_adaptionStatus)),
336
334
m_id(std::move(other.m_id)),
@@ -420,7 +418,6 @@ PatchKernel & PatchKernel::operator=(PatchKernel &&other)
420
418
m_boxMaxCounter = std::move (other.m_boxMaxCounter );
421
419
m_adjacenciesBuildStrategy = std::move (other.m_adjacenciesBuildStrategy );
422
420
m_interfacesBuildStrategy = std::move (other.m_interfacesBuildStrategy );
423
- m_spawnStatus = std::move (other.m_spawnStatus );
424
421
m_adaptionMode = std::move (other.m_adaptionMode );
425
422
m_adaptionStatus = std::move (other.m_adaptionStatus );
426
423
m_id = std::move (other.m_id );
@@ -524,12 +521,6 @@ void PatchKernel::initialize()
524
521
// Set interfaces build strategy
525
522
setInterfacesBuildStrategy (INTERFACES_NONE);
526
523
527
- // Set the spawn as unneeded
528
- //
529
- // Specific implementation will set the appropriate status during their
530
- // initialization.
531
- setSpawnStatus (SPAWN_UNNEEDED);
532
-
533
524
// Set the adaption as clean
534
525
setAdaptionStatus (ADAPTION_CLEAN);
535
526
@@ -646,12 +637,6 @@ std::vector<adaption::Info> PatchKernel::update(bool trackAdaption, bool squeeze
646
637
// Finalize alterations
647
638
finalizeAlterations (squeezeStorage);
648
639
649
- // Spawn
650
- bool spawnNeeed = (getSpawnStatus () == SPAWN_NEEDED);
651
- if (spawnNeeed) {
652
- mergeAdaptionInfo (spawn (trackAdaption), updateInfo);
653
- }
654
-
655
640
// Adaption
656
641
bool adaptionDirty = (getAdaptionStatus (true ) == ADAPTION_DIRTY);
657
642
if (adaptionDirty) {
@@ -681,44 +666,6 @@ void PatchKernel::simulateCellUpdate(const long id, adaption::Marker marker, std
681
666
throw std::runtime_error (" This function has not been implemented for the specified patch." );
682
667
}
683
668
684
- /* !
685
- Generates the patch.
686
-
687
- \param trackSpawn if set to true the changes to the patch will be tracked
688
- \result Returns a vector of adaption::Info that can be used to track
689
- the changes done during the spawn.
690
- */
691
- std::vector<adaption::Info> PatchKernel::spawn (bool trackSpawn)
692
- {
693
- std::vector<adaption::Info> spawnInfo;
694
-
695
- #if BITPIT_ENABLE_MPI==1
696
- // This is a collevtive operation and should be called by all processes
697
- if (isPartitioned ()) {
698
- const auto &communicator = getCommunicator ();
699
- MPI_Barrier (communicator);
700
- }
701
- #endif
702
-
703
- // Check spawn status
704
- SpawnStatus spawnStatus = getSpawnStatus ();
705
- if (spawnStatus == SPAWN_UNNEEDED || spawnStatus == SPAWN_DONE) {
706
- return spawnInfo;
707
- }
708
-
709
- // Spawn the patch
710
- spawnInfo = _spawn (trackSpawn);
711
-
712
- // Finalize patch alterations
713
- finalizeAlterations (true );
714
-
715
- // Spwan is done
716
- setSpawnStatus (SPAWN_DONE);
717
-
718
- // Done
719
- return spawnInfo;
720
- }
721
-
722
669
/* !
723
670
Execute patch adaption.
724
671
@@ -1335,33 +1282,6 @@ void PatchKernel::_writeFinalize()
1335
1282
// Nothing to do
1336
1283
}
1337
1284
1338
- /* !
1339
- Returns the current spawn status.
1340
-
1341
- Span functionality is obsolete. The patch dosn't need to be spawned
1342
- anymore.
1343
-
1344
- \return The current spawn status.
1345
- */
1346
- PatchKernel::SpawnStatus PatchKernel::getSpawnStatus () const
1347
- {
1348
- // There is no need to check the spawn status globally because the spawn
1349
- // status will always be the same on all the processes.
1350
-
1351
- return m_spawnStatus;
1352
- }
1353
-
1354
- /* !
1355
- Set the current spawn status.
1356
-
1357
- \param status is the spawn status that will be set
1358
- */
1359
- void PatchKernel::setSpawnStatus (SpawnStatus status)
1360
- {
1361
- m_spawnStatus = status;
1362
- }
1363
-
1364
-
1365
1285
/* !
1366
1286
Checks if the patch supports adaption.
1367
1287
@@ -1470,10 +1390,6 @@ bool PatchKernel::isDirty(bool global) const
1470
1390
assert (isDirty || m_alteredInterfaces.empty ());
1471
1391
}
1472
1392
1473
- if (!isDirty) {
1474
- isDirty |= (getSpawnStatus () == SPAWN_NEEDED);
1475
- }
1476
-
1477
1393
if (!isDirty) {
1478
1394
isDirty |= (getAdaptionStatus (false ) == ADAPTION_DIRTY);
1479
1395
}
@@ -5265,24 +5181,6 @@ void PatchKernel::restoreInterfaces(std::istream &stream)
5265
5181
setAdaptionMode (previousAdaptionMode);
5266
5182
}
5267
5183
5268
- /* !
5269
- Generates the patch.
5270
-
5271
- Default implementation is a no-op function.
5272
-
5273
- \param trackSpawn if set to true the changes to the patch will be tracked
5274
- \result Returns a vector of adaption::Info that can be used to track
5275
- the changes done during the spawn.
5276
- */
5277
- std::vector<adaption::Info> PatchKernel::_spawn (bool trackSpawn)
5278
- {
5279
- BITPIT_UNUSED (trackSpawn);
5280
-
5281
- assert (false && " The patch needs to implement _spawn" );
5282
-
5283
- return std::vector<adaption::Info>();
5284
- }
5285
-
5286
5184
/* !
5287
5185
Prepares the patch for performing the adaption.
5288
5186
@@ -8335,9 +8233,6 @@ bool PatchKernel::dump(std::ostream &stream) const
8335
8233
utils::binary::write (stream, 0 );
8336
8234
#endif
8337
8235
8338
- // Spawn status
8339
- utils::binary::write (stream, m_spawnStatus);
8340
-
8341
8236
// Adaption information
8342
8237
utils::binary::write (stream, m_adaptionMode);
8343
8238
utils::binary::write (stream, m_adaptionStatus);
@@ -8436,9 +8331,6 @@ void PatchKernel::restore(std::istream &stream, bool reregister)
8436
8331
utils::binary::read (stream, dummyHaloSize);
8437
8332
#endif
8438
8333
8439
- // Spawn status
8440
- utils::binary::read (stream, m_spawnStatus);
8441
-
8442
8334
// Adaption information
8443
8335
utils::binary::read (stream, m_adaptionMode);
8444
8336
utils::binary::read (stream, m_adaptionStatus);
0 commit comments