@@ -243,7 +243,6 @@ PatchKernel::PatchKernel(const PatchKernel &other)
243243 m_boxMaxCounter(other.m_boxMaxCounter),
244244 m_adjacenciesBuildStrategy(other.m_adjacenciesBuildStrategy),
245245 m_interfacesBuildStrategy(other.m_interfacesBuildStrategy),
246- m_spawnStatus(other.m_spawnStatus),
247246 m_adaptionMode(other.m_adaptionMode),
248247 m_adaptionStatus(other.m_adaptionStatus),
249248 m_dimension(other.m_dimension),
@@ -330,7 +329,6 @@ PatchKernel::PatchKernel(PatchKernel &&other)
330329 m_boxMaxCounter(std::move(other.m_boxMaxCounter)),
331330 m_adjacenciesBuildStrategy(std::move(other.m_adjacenciesBuildStrategy)),
332331 m_interfacesBuildStrategy(std::move(other.m_interfacesBuildStrategy)),
333- m_spawnStatus(std::move(other.m_spawnStatus)),
334332 m_adaptionMode(std::move(other.m_adaptionMode)),
335333 m_adaptionStatus(std::move(other.m_adaptionStatus)),
336334 m_id(std::move(other.m_id)),
@@ -420,7 +418,6 @@ PatchKernel & PatchKernel::operator=(PatchKernel &&other)
420418 m_boxMaxCounter = std::move (other.m_boxMaxCounter );
421419 m_adjacenciesBuildStrategy = std::move (other.m_adjacenciesBuildStrategy );
422420 m_interfacesBuildStrategy = std::move (other.m_interfacesBuildStrategy );
423- m_spawnStatus = std::move (other.m_spawnStatus );
424421 m_adaptionMode = std::move (other.m_adaptionMode );
425422 m_adaptionStatus = std::move (other.m_adaptionStatus );
426423 m_id = std::move (other.m_id );
@@ -524,12 +521,6 @@ void PatchKernel::initialize()
524521 // Set interfaces build strategy
525522 setInterfacesBuildStrategy (INTERFACES_NONE);
526523
527- // Set the spawn as unneeded
528- //
529- // Specific implementation will set the appropriate status during their
530- // initialization.
531- setSpawnStatus (SPAWN_UNNEEDED);
532-
533524 // Set the adaption as clean
534525 setAdaptionStatus (ADAPTION_CLEAN);
535526
@@ -646,12 +637,6 @@ std::vector<adaption::Info> PatchKernel::update(bool trackAdaption, bool squeeze
646637 // Finalize alterations
647638 finalizeAlterations (squeezeStorage);
648639
649- // Spawn
650- bool spawnNeeed = (getSpawnStatus () == SPAWN_NEEDED);
651- if (spawnNeeed) {
652- mergeAdaptionInfo (spawn (trackAdaption), updateInfo);
653- }
654-
655640 // Adaption
656641 bool adaptionDirty = (getAdaptionStatus (true ) == ADAPTION_DIRTY);
657642 if (adaptionDirty) {
@@ -681,44 +666,6 @@ void PatchKernel::simulateCellUpdate(const long id, adaption::Marker marker, std
681666 throw std::runtime_error (" This function has not been implemented for the specified patch." );
682667}
683668
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-
722669/* !
723670 Execute patch adaption.
724671
@@ -1335,33 +1282,6 @@ void PatchKernel::_writeFinalize()
13351282 // Nothing to do
13361283}
13371284
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-
13651285/* !
13661286 Checks if the patch supports adaption.
13671287
@@ -1470,10 +1390,6 @@ bool PatchKernel::isDirty(bool global) const
14701390 assert (isDirty || m_alteredInterfaces.empty ());
14711391 }
14721392
1473- if (!isDirty) {
1474- isDirty |= (getSpawnStatus () == SPAWN_NEEDED);
1475- }
1476-
14771393 if (!isDirty) {
14781394 isDirty |= (getAdaptionStatus (false ) == ADAPTION_DIRTY);
14791395 }
@@ -5265,24 +5181,6 @@ void PatchKernel::restoreInterfaces(std::istream &stream)
52655181 setAdaptionMode (previousAdaptionMode);
52665182}
52675183
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-
52865184/* !
52875185 Prepares the patch for performing the adaption.
52885186
@@ -8345,9 +8243,6 @@ bool PatchKernel::dump(std::ostream &stream) const
83458243 utils::binary::write (stream, 0 );
83468244#endif
83478245
8348- // Spawn status
8349- utils::binary::write (stream, m_spawnStatus);
8350-
83518246 // Adaption information
83528247 utils::binary::write (stream, m_adaptionMode);
83538248 utils::binary::write (stream, m_adaptionStatus);
@@ -8446,9 +8341,6 @@ void PatchKernel::restore(std::istream &stream, bool reregister)
84468341 utils::binary::read (stream, dummyHaloSize);
84478342#endif
84488343
8449- // Spawn status
8450- utils::binary::read (stream, m_spawnStatus);
8451-
84528344 // Adaption information
84538345 utils::binary::read (stream, m_adaptionMode);
84548346 utils::binary::read (stream, m_adaptionStatus);
0 commit comments