diff --git a/palace/main.cpp b/palace/main.cpp index 7bf216394..0c26a92a0 100644 --- a/palace/main.cpp +++ b/palace/main.cpp @@ -173,9 +173,6 @@ static void PrintPalaceInfo(MPI_Comm comm, int np, int nt, mfem::Device &device) int main(int argc, char *argv[]) { - // Initialize the timer. - BlockTimer bt(Timer::INIT); - // Initialize MPI. Mpi::Init(argc, argv); MPI_Comm world_comm = Mpi::World(); @@ -183,6 +180,9 @@ int main(int argc, char *argv[]) int world_size = Mpi::Size(world_comm); Mpi::Print(world_comm, "\n"); + // Initialize the timer. + BlockTimer bt(Timer::INIT); + // Parse command-line options. std::vector argv_sv(argv, argv + argc); bool dryrun = false; diff --git a/palace/models/lumpedportoperator.cpp b/palace/models/lumpedportoperator.cpp index a3dca517d..fa90f9c59 100644 --- a/palace/models/lumpedportoperator.cpp +++ b/palace/models/lumpedportoperator.cpp @@ -176,8 +176,10 @@ void LumpedPortData::InitializeLinearForms(mfem::ParFiniteElementSpace &nd_fespa for (const auto &elem : elems) { const double Rs = R * GetToSquare(*elem); - const double Hinc = 1.0 / std::sqrt(Rs * elem->GetGeometryWidth() * - elem->GetGeometryLength() * elems.size()); + const double Hinc = (std::abs(Rs) > 0.0) + ? 1.0 / std::sqrt(Rs * elem->GetGeometryWidth() * + elem->GetGeometryLength() * elems.size()) + : 0.0; fb.AddCoefficient(elem->GetModeCoefficient(Hinc)); } s = std::make_unique(&nd_fespace); diff --git a/palace/utils/configfile.hpp b/palace/utils/configfile.hpp index 4b27a1d4d..775423281 100644 --- a/palace/utils/configfile.hpp +++ b/palace/utils/configfile.hpp @@ -150,7 +150,7 @@ struct RefinementData bool nonconformal = true; // Maximum difference in nonconformal refinements between two adjacent elements. Zero - // implies there is no constraint on local non-conformity. + // implies there is no constraint on local nonconformity. int max_nc_levels = 1; // Dörfler update fraction. The set of marked elements is the minimum set that contains