Repository navigation
Add DAGP_fv for FCI #3478
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
Merged
Add DAGP_fv for FCI #3478
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
bce460e
Add DAGP_fv for FCI
dschwoerer a42656c
Apply some clang-tidy fixes
dschwoerer 0b9160e
Apply more clang-tidy-fixes
dschwoerer 6b52b26
Apply suggestions from code review
dschwoerer ccc860d
Rename to Div_a_Grad_perp_pre and make const
dschwoerer 04e249d
Avoid warning for 3D metrics
dschwoerer 4f6fbd5
Add missing header
dschwoerer df5c791
Add docs
dschwoerer 29c9902
Rename to Div_a_Grad_perp_FCI
dschwoerer 140ca51
Add basic unit test for FV::Div_a_Grad_per_FCI
dschwoerer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| #include "gtest/gtest.h" | ||
| #include <cmath> | ||
|
|
||
| #include "bout/build_defines.hxx" | ||
| #include "bout/constants.hxx" | ||
| #include "bout/coordinates.hxx" | ||
| #include "bout/fv_ops.hxx" | ||
| #include "bout/mesh.hxx" | ||
| #include "bout/output.hxx" | ||
|
|
||
| #include "fake_mesh.hxx" | ||
| #include "fake_mesh_fixture.hxx" | ||
| #include "test_extras.hxx" | ||
|
|
||
| using bout::globals::mesh; | ||
|
|
||
| using FVOpsTest = FakeMeshFixture; | ||
|
|
||
| TEST_F(FVOpsTest, Div_a_Grad_perp_FCI_no_coeffs) { | ||
| EXPECT_THROW(FV::Div_a_Grad_perp_FCI::create(mesh, 1), BoutException); | ||
| } | ||
|
|
||
| TEST_F(FVOpsTest, Div_a_Grad_perp_FCI_coeffs) { | ||
| static_cast<FakeMesh*>(bout::globals::mesh) | ||
| ->setGridDataSource(new FakeGridDataSource({{"dagp_fv_XX", 1.0}, | ||
| {"dagp_fv_XZ", 1.0}, | ||
| {"dagp_fv_ZX", 1.0}, | ||
| {"dagp_fv_ZZ", 1.0}, | ||
| {"dagp_fv_volume", 1.0}})); | ||
|
|
||
| auto op = FV::Div_a_Grad_perp_FCI::create(mesh, 1); | ||
| Field3D a{1.0}, f{1.0}; | ||
| (*op)(a, f, true); | ||
| (*op)(a, f, false); | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.