Skip to content

Commit

Permalink
Add BC switch
Browse files Browse the repository at this point in the history
  • Loading branch information
siuwuncheung committed Mar 18, 2024
1 parent 046ca92 commit 873891a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/prom/elliptic_eigenproblem_global_rom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ int main(int argc, char *argv[])

// 2. Parse command-line options.
const char *mesh_file = "";
bool dirichlet = false;
int ser_ref_levels = 2;
int par_ref_levels = 1;
int order = 1;
Expand Down Expand Up @@ -95,6 +96,8 @@ int main(int argc, char *argv[])
"Mesh file to use.");
args.AddOption(&problem, "-p", "--problem",
"Problem setup to use. See options in Conductivity and Potential functions.");
args.AddOption(&dirichlet, "-dir", "--dirichlet", "-neu", "--neumann",
"BC switch.");
args.AddOption(&ser_ref_levels, "-rs", "--refine-serial",
"Number of times to refine the mesh uniformly in serial.");
args.AddOption(&par_ref_levels, "-rp", "--refine-parallel",
Expand Down Expand Up @@ -298,7 +301,7 @@ int main(int argc, char *argv[])
if (pmesh->bdr_attributes.Size())
{
ess_bdr.SetSize(pmesh->bdr_attributes.Max());
ess_bdr = 1;
ess_bdr = (dirichlet) ? 1 : 0;
}

ParBilinearForm *a = new ParBilinearForm(fespace);
Expand Down

0 comments on commit 873891a

Please sign in to comment.