Skip to content

Commit

Permalink
Remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
brryan committed Jul 31, 2024
1 parent b4487b1 commit d68e6dd
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 29 deletions.
24 changes: 0 additions & 24 deletions src/interface/swarm_container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,6 @@ void SwarmContainer::Initialize(const std::shared_ptr<StateDescriptor> resolved_
}
}

void SwarmContainer::InitializeBoundaries(const std::shared_ptr<MeshBlock> pmb) {
if (swarmVector_.empty()) {
// No Swarms in this container, so no need to initialize boundaries
// This allows default reflecting boundary conditions to be used when no
// swarms are present in a parthenon calculation.
// NOTE SwarmContainer::Initialize must have already been called.
return;
}

//std::stringstream msg;
//auto &bcs = pmb->pmy_mesh->mesh_bcs;
//// Check that, if we are using user BCs, they are actually enrolled, and unsupported BCs
//// are not being used
//for (int iFace = 0; iFace < 6; iFace++) {
// if (bcs[iFace] != BoundaryFlag::user &&
// bcs[iFace] != BoundaryFlag::outflow &&
// bcs[iFace] != BoundaryFlag::periodic) {
// msg << (iFace % 2 == 0 ? "i" : "o") << "x" << iFace / 2 + 1 << " boundary flag "
// << static_cast<int>(bcs[iFace]) << " not supported!";
// PARTHENON_FAIL(msg);
// }
//}
}

void SwarmContainer::Add(const std::vector<std::string> &labelArray,
const Metadata &metadata) {
// generate the vector and call Add
Expand Down
2 changes: 0 additions & 2 deletions src/interface/swarm_container.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ class SwarmContainer {
void Initialize(const std::shared_ptr<StateDescriptor> resolved_packages,
const std::shared_ptr<MeshBlock> pmb);

void InitializeBoundaries(const std::shared_ptr<MeshBlock> pmb);

void Add(std::shared_ptr<Swarm> swarm) {
swarmVector_.push_back(swarm);
swarmMap_[swarm->label()] = swarm;
Expand Down
3 changes: 0 additions & 3 deletions src/mesh/meshblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ void MeshBlock::Initialize(int igid, int ilid, LogicalLocation iloc,
auto &real_container = meshblock_data.Get();
real_container->Initialize(shared_from_this());

// Initialize swarm boundary condition flags
real_container->GetSwarmData()->InitializeBoundaries(shared_from_this());

// TODO(jdolence): Should these loops be moved to Variable creation
// TODO(JMM): What variables should be in vars_cc_? They are used
// for counting load-balance cost. Should it be different than the
Expand Down

0 comments on commit d68e6dd

Please sign in to comment.