-
Notifications
You must be signed in to change notification settings - Fork 4
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
#216 iteratefdtd_matrix
: Updates for the main loop
#224
Conversation
…vious commit if undesired)
Should we, therefore, merge #222 as-is, to simplify(?) this diff? Then |
Yes - I've made #222 ready for review so it can go in. Then I can rebase/merge this on top of that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the slow review!
Weirdly I reviewed almost all of this on Monday and... then just stopped(!?)
All looks very good to me.
SimulationManager
is now a large class although that's a big improvement from a gigantonormous function.
Merge in linting changes that have since been merged into main
No worries 😃 However the changes based on your comments mean that GitHub wants a re-review. But all that's changed is me doing this and resolving the conflicts with |
Hm. Interesting. Was browsing the PR rules when looking into automerge but I didn't think I changed anything. |
* Cherry-pick Sam's linting * Add flag to Source class to indicate empty array * Add flag to Source class to indicate empty array * Indentation * Initialise values rather than assign * Refactored source updates - flagged mystery indexing * Pre-commit consistency with #223 * Update clang-format to #222 settings * Fix out-of-order initilisation warning * Revert pre-commit to suppress GitHub failures until #223 is ready * Remove unused variables in updating Ksource terms * Start refactoring the refactored functions. Flag more inconsistencies * Missing std:: * Merge E_s steady-state updates into one function (revert files to previous commit if undesired) * Fix bugs in unification (IE Will can't type) * Pull out E_s source updates, and wrap to avoid empty-source updates * Pull out H-source updates, don't add empty array checks yet * Fully refactor H-field, now to find the bug... * Add that newline to make pre-commit happy * Missed a -1 in ONE place... does this fix the bug? * Remove useless comment * Apply Peter's suggestion on #226 * Add Peter's resolution to #225 * Apply Sam's suggestions for SourceIndex struct * Small doc changes that didn't get caught
* Cherry-pick Sam's linting * Add flag to Source class to indicate empty array * Add flag to Source class to indicate empty array * Indentation * Initialise values rather than assign * Refactored source updates - flagged mystery indexing * Pre-commit consistency with #223 * Update clang-format to #222 settings * Fix out-of-order initilisation warning * Revert pre-commit to suppress GitHub failures until #223 is ready * Remove unused variables in updating Ksource terms * Start refactoring the refactored functions. Flag more inconsistencies * Missing std:: * Merge E_s steady-state updates into one function (revert files to previous commit if undesired) * Fix bugs in unification (IE Will can't type) * Pull out E_s source updates, and wrap to avoid empty-source updates * Pull out H-source updates, don't add empty array checks yet * Fully refactor H-field, now to find the bug... * Add that newline to make pre-commit happy * Missed a -1 in ONE place... does this fix the bug? * Remove useless comment * Apply Peter's suggestion on #226 * Add Peter's resolution to #225 * Apply Sam's suggestions for SourceIndex struct * Small doc changes that didn't get caught
* Cherry-pick Sam's linting * Add flag to Source class to indicate empty array * Add flag to Source class to indicate empty array * Indentation * Initialise values rather than assign * Refactored source updates - flagged mystery indexing * Pre-commit consistency with #223 * Update clang-format to #222 settings * Fix out-of-order initilisation warning * Revert pre-commit to suppress GitHub failures until #223 is ready * Remove unused variables in updating Ksource terms * Start refactoring the refactored functions. Flag more inconsistencies * Missing std:: * Merge E_s steady-state updates into one function (revert files to previous commit if undesired) * Fix bugs in unification (IE Will can't type) * Pull out E_s source updates, and wrap to avoid empty-source updates * Pull out H-source updates, don't add empty array checks yet * Fully refactor H-field, now to find the bug... * Add that newline to make pre-commit happy * Missed a -1 in ONE place... does this fix the bug? * Remove useless comment * Apply Peter's suggestion on #226 * Add Peter's resolution to #225 * Apply Sam's suggestions for SourceIndex struct * Small doc changes that didn't get caught
Closes #216 | Continues #63 |
Diff is large because#222 merged so now the diff is manageable..clang-format
is running over all touched files.Source
class changes:no_data_stored
. This is safer than relying on comparing the data membersreal
andimag
tonullptr
, since these are public members and so could be accidentally modified in the codebase. Remove MATLAB dependency #70 May change this ethosis_empty()
that can be used to accessno_data_stored
.ObjectFromInfile
changes:all_sources_are_empty()
WDWYTID.SimulationManager
changes:post_processing()
method now only runs the normalisation lines if at least one of theSource
inputs is non-empty, as required.source_term_updates.cpp
New file that breaks off the aforementioned
Source
update equations from the main loop code, and places them into functions. Also involves a logic update and better variable scoping.update_{IJK}source_terms_steadystate()
handles the updates to theE_s, H_s, J_c, J_s
(as appropriate) insteadystate
simulations.update_source_steadystate()
serves to unify the update equations, preserving the general structure of the updates whilst usingswitch
es to account for differences between theI,J,K
cases.TODO:
E_s
steadystate
update equationsE_s
pulsed
update equationsH_s
steadystate
update equationsH_s
pulsed
update equationsIssue Resolutions Required
k
variable usage when updating source terms. #225 - issue remains open for further investigation.array_ind
scoping issues #226