Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1656 from Kenneth-T-Moore/ken3
Added a new iteration counter for apply_nonlinear.
- Loading branch information
Showing
8 changed files
with
127 additions
and
38 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 @@ | ||
************************************************ | ||
Determining How Many Times a System was Executed | ||
************************************************ | ||
|
||
All OpenMDAO `Systems` have a set of local counters that keep track of how many times they have | ||
been executed. | ||
|
||
**iter_count** | ||
|
||
Counts the number of times this system has called _solve_nonlinear. This also | ||
corresponds to the number of times that the system's outputs are recorded if a recorder | ||
is present. | ||
|
||
**iter_count_apply** | ||
|
||
Counts the number of times the system has called _apply_nonlinear. For ExplicitComponent, | ||
calls to apply_nonlinear also call compute, so number of executions can be found by adding | ||
this and iter_count together. Recorders do no record calls to _apply_nonlinear. | ||
|
||
**iter_count_without_approx** | ||
|
||
Counts the number of times the system has iterated but excludes any that occur during | ||
approximation of derivatives. | ||
|
||
When you have an `ExplicitComponent`, the number stored in iter_count may not match the total | ||
number of times that the "compute" function has been called. This is because compute is also | ||
called whenever '_apply_nonlinear' is called to compute the norm of the current residual. For | ||
an explicit equation, the residual is defined as the difference in the value of the outputs | ||
before and after execution, and an additional execution is required to compute this. | ||
|
||
The correct execution count for an ExplicitComponent can always be obtained by adding iter_count | ||
and iter_count_apply. | ||
|
||
The recorder iteration coordinate will always match the iter_count because calls to apply_nonlinear | ||
are not recorded. |