Skip to content

Commit 42756c6

Browse files
committed
Make field profile keys simpler.
1 parent a9ae853 commit 42756c6

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

miniapps/tools/reconstruction.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ int main(int argc, char* argv[])
3232
int order_im = 3; // itermediate order, only used for L2 projection method
3333
int lref = order_im+1;
3434

35-
std::string field_profile = "1 + kx x + ky y";
35+
std::string field_profile = "plane";
3636
real_t field_kx = 2.0;
3737
real_t field_ky = 4.0;
3838
bool use_ea = false;
@@ -245,21 +245,21 @@ std::unordered_map<std::string, profile_t> GetFieldProfiles()
245245
{
246246
std::unordered_map<std::string, profile_t> field_profiles;
247247
// plane profile
248-
field_profiles["1 + kx x + ky y"] =
248+
field_profiles["plane"] =
249249
[](const Vector &x, const Vector &k)
250250
{
251251
return 1.0 + x*k;
252252
};
253253
// sinusoidal profile
254-
field_profiles["sin(2pi kx x) sin(2pi ky y)"] =
254+
field_profiles["sinusoidal"] =
255255
[](const Vector &x, const Vector &k)
256256
{
257257
real_t result = 1.0;
258258
for(int i=0; i < x.Size(); i++) result *= std::sin(2.0*M_PI*k(i)*x(i));
259259
return result;
260260
};
261261
// exponential-sinusoidal profile
262-
field_profiles["exp(r) cos(kx x) sin(ky y)"] =
262+
field_profiles["exponential"] =
263263
[](const Vector &x, const Vector &k)
264264
{
265265
real_t result = 1.0;

miniapps/tools/run_convergence_study.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ def run_reconstruction(refinement_level, ho_value, method):
1818
try:
1919
# Run the executable
2020
result = subprocess.run(
21-
['./reconstruction', '-r', str(refinement_level), '-f', '2',
21+
['./reconstruction', '-r', str(refinement_level),
22+
'-f', 'exponential',
2223
'-ho', str(ho_value), '-m', method],
2324
capture_output=True,
2425
text=True,
@@ -231,10 +232,10 @@ def main():
231232
cli_args = parser.parse_args()
232233

233234
# Refinement levels to test
234-
refinement_levels = [0, 1, 2, 3, 4]
235+
refinement_levels = [0, 1, 2, 3]
235236

236237
# ho values to test
237-
ho_values = [1, 7]
238+
ho_values = [1, 3]
238239

239240
# Error data filename
240241
error_file = 'convergence_errors.json'

0 commit comments

Comments
 (0)