Skip to content

Commit

Permalink
Fix failing CI
Browse files Browse the repository at this point in the history
  • Loading branch information
siuwuncheung committed Jun 20, 2024
1 parent 60f0013 commit 4d0abab
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/prom/elliptic_eigenproblem_global_rom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -887,12 +887,13 @@ int main(int argc, char *argv[])

double Conductivity(const Vector &x)
{
double cx;
switch (problem)
{
case 1:
return 1.0;
case 2:
double cx = 1.0 + amplitude;
cx = 1.0 + amplitude;
for (int i = 0; i < x.Size(); ++i)
{
if (8 * abs(x(i) - center(i)) > (bb_max[i] - bb_min[i]))
Expand All @@ -908,17 +909,17 @@ double Conductivity(const Vector &x)

double Potential(const Vector &x)
{
double radius = 5.0 * h_max;
double d_sq = x.DistanceSquaredTo(center);
switch (problem)
{
case 1:
case 2:
return 0.0;
case 3:
double radius = 5.0 * h_max;
return amplitude * std::exp(-d_sq / pow(radius, 2.0));
case 4:
return amplitude / d_sq;
return amplitude * d_sq;
}
return 0.0;
}

0 comments on commit 4d0abab

Please sign in to comment.