-
Notifications
You must be signed in to change notification settings - Fork 918
Discrete adjoint for dynamic FSI using multizone driver #1260
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
Merged
Changes from all commits
Commits
Show all changes
92 commits
Select commit
Hold shift + click to select a range
8804def
extend driver for time-accurate problems
cvencro 880b8ca
identify and update previous time solutions for diagonal terms only
cvencro 2fefad6
create previous time sensitivity variables
cvencro 80c60de
set sensitivity in domain solver for current time only
cvencro db4d175
remove error
cvencro 8a4f6ce
Merge branch 'feature_velocity_bc_fsi' into feature_dynFSIAD
cvencro 91dfb9e
Merge branch 'develop' into feature_dynFSIAD
cvencro 655e7cb
add call to predicted structural velocity
cvencro 1751907
register and extract again
cvencro 42554b6
do not set previous time structural solutions here again for AD problems
cvencro bed3c05
set FSI flag correctly for adjoint problems
cvencro be6757e
load from adjoint time iteration for AD
cvencro a16e929
reload grid volumes correctly in AD run
cvencro 252a3c6
add velocity source term similar to displacement
cvencro 52db11a
do not set initial conditions again for AD problems
cvencro 4da496a
always register coordinates and MPI comms
cvencro f7eb0ae
add indexed calls for time accurate AD variables
cvencro 9bf4a70
temporary output of structural dv gradient
cvencro 049dcc0
Merge branch 'feature_velocity_bc_fsi' into feature_dynFSIAD
cvencro a40d9cb
correct time for adjoint problems with gust
cvencro 93f2a2c
remove reset of grid velocity
cvencro 1bdc1ed
reset still needed for fluid only problems
cvencro ead257f
Merge branch 'feature_velocity_bc_fsi' into feature_dynFSIAD after fi…
cvencro ea8a911
Merge branch 'fix_tavg_output' into feature_dynFSIAD
cvencro baea20c
Merge branch 'develop' into feature_dynFSIAD after fixing conflicts
cvencro b6958d9
switch on/off grid velocity
cvencro a9c1a08
Add test case
cvencro 1fc2345
tidy up
cvencro d912132
update time averaging values - add for new time or replace for existi…
cvencro 04cc74b
Revert "update time averaging values - add for new time or replace fo…
cvencro b8a0acc
Merge branch 'develop' into feature_dynFSIAD
cvencro eb4187f
Merge branch 'feature_velocity_bc_fsi' into feature_dynFSIAD
cvencro 12345a6
build fixes
cvencro 191a1d0
more build fixes
cvencro 8de46db
Merge branch 'feature_dynFSIAD' of https://github.com/su2code/SU2 int…
cvencro 4191e45
try build fix - initialize with no solver
cvencro b35208e
build fix - add missing reference
cvencro 8c5aae0
Merge branch 'feature_velocity_bc_fsi' into feature_dynFSIAD
cvencro 0986437
remove separate predict velocity call
cvencro a9c17de
fixes for disc adj cht reg test
cvencro 1c171f3
update test to match zero disp for negative time steps
cvencro dd965e2
Merge branch 'develop' into feature_dynFSIAD
cvencro caaf295
Merge branch 'feature_velocity_bc_fsi' into feature_dynFSIAD
cvencro 2ab6a61
Merge branch 'develop' into feature_dynFSIAD
pcarruscag 7eb05f9
combine disp, vel, accel into solution for dynamic problems
cvencro 86cbc3b
Merge branch 'develop' into feature_dynFSIAD after minor conflicts
cvencro ebfd56e
remove unused variables
cvencro d9da2ee
remove more unused variables
cvencro df2ef6d
update predicted solution to include velocity
cvencro eee4f17
missed dynamic flag
cvencro 6ebed52
another missed dynamic flag
cvencro 61d9883
undo changes to the primal variables
cvencro e9b729e
fix modified variables and indices
cvencro 8c26d1b
unused dynamic flag
cvencro cb3ff26
undo changes to interface
cvencro 58d939b
Merge branch 'develop' into feature_dynFSIAD
cvencro 84f446b
try halfway with updated primal solution with small solver changes
cvencro 6c6af76
alternative approach with combining dynamic structural solution for a…
cvencro 2c261d3
more general treatment of FEA adjoint state
pcarruscag 3cdb727
fix issues
pcarruscag d6ab86d
CDiscAdjFEAVariable replaced by CDiscAdjVariable
pcarruscag 6d8209a
Merge remote-tracking branch 'origin/develop' into feature_dynFSIAD
TobiKattmann 2fc6555
Fix build
TobiKattmann 8f8e007
Clean CDiscAdjVar.hpp: Added briefs, deleted superfluous inputs, line…
TobiKattmann 64897d3
some cleanup
pcarruscag b282d20
more cleaning of old things
pcarruscag d8ef5f3
multizone output only for reg test compare
cvencro 34061a6
fix for dynamic AD convergence
cvencro 97ba004
only for deformation problems
cvencro 04b8a6e
move some chunks out of CDiscAdjMultizoneDriver::Run to make it more …
pcarruscag ee29c33
temporarily revert dualtime derivative changes to external
cvencro a0a68ad
fix potential issue when registering mesh coordinates
pcarruscag 7f07000
dual time in external, now without breaking it
pcarruscag 5eafa5a
special "iterate" for discrete adjoint iterations
pcarruscag 7e08678
indentation
pcarruscag ee76b68
numeric limits instead of large number
pcarruscag c8b094f
spacing
pcarruscag e6a9a3a
Apply suggestions from code review
pcarruscag d64d7ee
typo
pcarruscag 947fdfa
Update SU2_CFD/src/python_wrapper_structure.cpp
pcarruscag 34b5387
Update SU2_CFD/src/variables/CVariable.cpp
pcarruscag 5269355
Merge branch 'develop' into feature_dynFSIAD
TobiKattmann e730626
add regression test
cvencro 8ed0250
Update parallel_regression_AD.py for dynamic fsi
cvencro 1fab0e3
read binary restart files
cvencro afbb343
remove test cases
cvencro 003aba3
Merge branch 'feature_dynFSIAD' of https://github.com/su2code/SU2 int…
cvencro 38afb5e
add gradient reference
cvencro 5d5f2b8
Enable regression
pcarruscag 7fe3d48
move new test
cvencro 6985d5d
Merge update
cvencro 590fddd
fix file output issues
pcarruscag 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -98,6 +98,7 @@ class CDiscAdjMultizoneDriver : public CMultizoneDriver { | |
| COutput** direct_output; /*!< \brief Array of pointers to the direct outputs. */ | ||
| vector<unsigned short> direct_nInst; /*!< \brief Total number of instances in the direct problem. */ | ||
| vector<unsigned long> nInnerIter; /*!< \brief Number of inner iterations for each zone. */ | ||
| unsigned long wrt_sol_freq = std::numeric_limits<unsigned long>::max(); /*!< \brief File output frequency. */ | ||
|
|
||
| su2vector<bool> Has_Deformation; /*!< \brief True if iZone has mesh deformation (used for | ||
| lazy evaluation of TRANSFER tape section). */ | ||
|
|
@@ -138,6 +139,11 @@ class CDiscAdjMultizoneDriver : public CMultizoneDriver { | |
|
|
||
| protected: | ||
|
|
||
| /*! | ||
| * \brief Preprocess the multizone iteration | ||
| */ | ||
| void Preprocess(unsigned long TimeIter) override; | ||
|
|
||
| /*! | ||
| * \brief [Overload] Run an discrete adjoint update of all solvers within multiple zones. | ||
| */ | ||
|
|
@@ -149,12 +155,23 @@ class CDiscAdjMultizoneDriver : public CMultizoneDriver { | |
| */ | ||
| bool Iterate(unsigned short iZone, unsigned long iInnerIter, bool KrylovMode = false); | ||
|
|
||
| /*! | ||
| * \brief Run inner iterations using a Krylov method (GMRES atm). | ||
| */ | ||
| void KrylovInnerIters(unsigned short iZone); | ||
|
|
||
| /*! | ||
| * \brief Evaluate the gradient of the objective function and add to "External". | ||
| * \return "True" if the gradient is numerically 0. | ||
| */ | ||
| bool EvaluateObjectiveFunctionGradient(); | ||
|
|
||
| /*! | ||
| * \brief Evaluate sensitivites for the current adjoint solution and output files. | ||
| * \param[in] iOuterIter - Current outer iteration. | ||
| * \param[in] StopCalc - Final iteration flag (converged or reached max number of iters). | ||
| * \param[in] Iter - Current outer or time iteration. | ||
| * \param[in] force_writing - Force file output. | ||
| */ | ||
| void EvaluateSensitivities(unsigned long iOuterIter, bool StopCalc); | ||
| void EvaluateSensitivities(unsigned long Iter, bool force_writing); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
|
|
||
| /*! | ||
| * \brief Setup the matrix of cross-terms. Allocate necessary memory and initialize to zero. | ||
|
|
@@ -217,6 +234,11 @@ class CDiscAdjMultizoneDriver : public CMultizoneDriver { | |
| */ | ||
| void Add_Solution_To_External(unsigned short iZone); | ||
|
|
||
| /*! | ||
| * \brief Puts dual time derivative vector to External. | ||
| */ | ||
| void Set_External_To_DualTimeDer(); | ||
pcarruscag marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| /*! | ||
| * \brief Add External_Old vector to Solution. | ||
| * \param[in] iZone - Zone index. | ||
|
|
||
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
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
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.