ROM k-eigenvalue implementation#11
Conversation
| @@ -0,0 +1,14 @@ | |||
| NUM_GROUPS 2 | |||
There was a problem hiding this comment.
OpenSn cross section files use usually .xs, not .txt
| @@ -0,0 +1,27 @@ | |||
| # 1dk/ | |||
There was a problem hiding this comment.
Is the trailing / part of the name or just copy-paste artifact?
| } | ||
| if (rom_options.phase == Phase::SYSTEMS) | ||
| { | ||
| std::shared_ptr<CAROM::Matrix> AU_ = rom_problem_->AssembleAU(); |
There was a problem hiding this comment.
If you are following coding standard for OpenSn, then local variables should not have trailing _.
| * Each group basis is read from the corresponding libROM basis file and | ||
| * stored in \c Ugs_. The reduced dimension is inferred from the first | ||
| * basis and stored in \c rom_rank. | ||
| */ |
There was a problem hiding this comment.
Doxygen usually goes into the header file, not the .cc file.
But I see other functions have doxygen here, maybe that should be unified within the app in a separate PR.
wdhawkins
left a comment
There was a problem hiding this comment.
If you haven't already, please run clang-tidy and flake8 on your changes.
| assert(lbs_problem_->GetNumWGSSolvers() == 1); | ||
| auto raw_context = lbs_problem_->GetWGSSolver(0)->GetContext(); | ||
| auto gs_context = std::dynamic_pointer_cast<WGSContext>(raw_context); | ||
| const auto scope = APPLY_AGS_FISSION_SOURCES | APPLY_WGS_FISSION_SOURCES | APPLY_AGS_SCATTER_SOURCES | APPLY_FIXED_SOURCES; |
There was a problem hiding this comment.
Shouldn't this just be APPLY_AGS_FISSION_SOURCES | APPLY_WGS_FISSION_SOURCES?
| best_col = i; | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
You should check here that you found a valid best_col and it's not still -1.
| errors = [] | ||
| for g in range(G): | ||
| rom_vals[g] /= np.linalg.norm(rom_vals[g]) | ||
| rom_vals = np.abs(rom_vals) |
There was a problem hiding this comment.
It might be better to use a local array here instead of modifying rom_vals while you're looping over it.
Contains my k-eigenvalue implementation as well as READMEs for each of the subfolders. I included an additional example in the workflow that runs a k-eigenvalue problem.