Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compare test cases to full simulation results #95

Open
1 task done
mrp089 opened this issue Jan 23, 2024 · 0 comments
Open
1 task done

Compare test cases to full simulation results #95

mrp089 opened this issue Jan 23, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@mrp089
Copy link
Member

mrp089 commented Jan 23, 2024

Problem

It's a bit tedious to add new test cases because reference solutions need to be defined manually, e.g.:

def test_steady_flow_R_R():
results = run_test_case_by_name("steadyFlow_R_R")
assert np.isclose(
get_result(results, "pressure_in", 0, -1), 1100.0, rtol=RTOL_PRES
) # inlet pressure
assert np.isclose(
get_result(results, "pressure_out", 0, -1), 600.0, rtol=RTOL_PRES
) # outlet pressure
assert np.isclose(
get_result(results, "flow_in", 0, -1), 5.0, rtol=RTOL_FLOW
) # inlet flow
assert np.isclose(
get_result(results, "flow_out", 0, -1), 5.0, rtol=RTOL_FLOW
) # outlet flow

Solution

Store a reference solution (computed with svZeroDSolver) with git lfs in a folder for each test case and automatically compare all flow and pressure results. This makes it easier to add new tests and also tests stricter since the whole solution is compared to a reference. We already do this in svFSI+.

Additional context

We still retain information from analytically computed reference solutions as these are stored in the test cases themselves.

Code of Conduct

  • I agree to follow this project's Code of Conduct and Contributing Guidelines
@mrp089 mrp089 added the enhancement New feature or request label Jan 23, 2024
@mrp089 mrp089 self-assigned this Jan 23, 2024
@menon-karthik menon-karthik added the good first issue Good for newcomers label Feb 26, 2024
@menon-karthik menon-karthik assigned ncdorn and unassigned mrp089 Feb 26, 2024
ncdorn added a commit to ncdorn/svZeroDSolver that referenced this issue Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants