Skip to content

Commit

Permalink
Merge pull request #174 from awslabs/sjg/mat-coeff-revisions-fix
Browse files Browse the repository at this point in the history
Minor fixes following #166
  • Loading branch information
sebastiangrimberg authored Jan 18, 2024
2 parents 2960554 + c24b66a commit 09e81d4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions palace/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,16 @@ 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();
bool world_root = Mpi::Root(world_comm);
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<std::string_view> argv_sv(argv, argv + argc);
bool dryrun = false;
Expand Down
6 changes: 4 additions & 2 deletions palace/models/lumpedportoperator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<mfem::LinearForm>(&nd_fespace);
Expand Down
2 changes: 1 addition & 1 deletion palace/utils/configfile.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 09e81d4

Please sign in to comment.