Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src/smith/physics/mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Mesh::Mesh(const std::string& meshfile, const std::string& meshtag, int refine_s
{
auto meshtmp = mesh::refineAndDistribute(buildMeshFromFile(meshfile), refine_serial, refine_parallel, comm);
mfem_mesh_ = &smith::StateManager::setMesh(std::move(meshtmp), mesh_tag_);
errorIfRankHasNoElements();
createDomains();
}

Expand All @@ -33,7 +32,6 @@ Mesh::Mesh(mfem::Mesh&& mesh, const std::string& meshtag, int refine_serial, int
{
auto meshtmp = smith::mesh::refineAndDistribute(std::move(mesh), refine_serial, refine_parallel, comm);
mfem_mesh_ = &smith::StateManager::setMesh(std::move(meshtmp), mesh_tag_);
errorIfRankHasNoElements();
createDomains();
}

Expand All @@ -43,15 +41,9 @@ Mesh::Mesh(mfem::ParMesh&& mesh, const std::string& meshtag) : mesh_tag_(meshtag
meshtmp->EnsureNodes();
meshtmp->ExchangeFaceNbrData();
mfem_mesh_ = &smith::StateManager::setMesh(std::move(meshtmp), mesh_tag_);
errorIfRankHasNoElements();
createDomains();
}

void Mesh::errorIfRankHasNoElements() const
{
SLIC_ERROR_IF(mfem_mesh_->GetNE() == 0, "After refining and distributing mesh, local size of mesh is 0");
}

MPI_Comm Mesh::getComm() const { return mfem_mesh_->GetComm(); }

void Mesh::createDomains()
Expand Down
3 changes: 0 additions & 3 deletions src/smith/physics/mesh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,6 @@ class Mesh {
smith::FiniteElementDual newShapeDisplacementDual();

private:
/// @brief Helper function used to throw exception if the size of the mesh on the local rank is 0
void errorIfRankHasNoElements() const;

/// @brief Sets up some initial domains: entire domain, entire boundary, and interior faces. Eventually we can read
/// off names/blocks/attributes from the mesh and create default domains.
void createDomains();
Expand Down