Skip to content
Snippets Groups Projects
Verified Commit b18ce465 authored by Paul Dechamps's avatar Paul Dechamps :speech_balloon:
Browse files

(fix) Coupled adjoint solver now calls the inviscid adjoint

parent a6d83074
No related branches found
No related tags found
1 merge request!1BLASTER v1.0
......@@ -102,9 +102,6 @@ class BlasterSolver(om.ExplicitComponent):
self.tms['adj'].start()
print(ccolors.ANSI_BLUE, 'Computing derivatives in mode '+('viscous' if inputs['visc_mode'][0] else 'inviscid'), ccolors.ANSI_RESET)
# Run inviscid adjoint solver
self.isol.iobj['adj'].run()
dClaoa = 0.
dCdaoa = 0.
......@@ -112,6 +109,7 @@ class BlasterSolver(om.ExplicitComponent):
dCdx = np.zeros(self.isol.iobj['bnd'].nodes.size() * nDim)
if inputs['visc_mode'][0]:
# Viscous adjoint solver
self.adjointSolver.reset()
self.adjointSolver.run()
dClaoa = self.adjointSolver.tdCl_AoA
......@@ -123,6 +121,8 @@ class BlasterSolver(om.ExplicitComponent):
dClx[inod*nDim + idim] = self.adjointSolver.tdCl_x[n.row][idim]
dCdx[inod*nDim + idim] = self.adjointSolver.tdCd_x[n.row][idim]
elif not inputs['visc_mode'][0]:
# Inviscid adjoint solver
self.isol.iobj['adj'].run()
dClaoa = self.isol.iobj['adj'].dClAoa
dCdaoa = self.isol.iobj['adj'].dCdAoa
......
......@@ -208,6 +208,9 @@ void CoupledAdjoint::buildAdjointMatrix(
void CoupledAdjoint::run()
{
iadjoint->run();
tms["0-Total"].start();
tms["1-Derivatives"].start();
tms2["1-adj_inviscid"].start();
......
......@@ -112,11 +112,6 @@ def main():
aeroCoeffs = coupler.run()
tms['forward'].stop()
print(ccolors.ANSI_BLUE + 'PyDartAdjoint...' + ccolors.ANSI_RESET)
tms['adj_dart'].start()
isol.adjointSolver.run()
tms['adj_dart'].stop()
print(ccolors.ANSI_BLUE + 'PyBlasterAdjoint...' + ccolors.ANSI_RESET)
tms['adj_blast'].start()
cAdj.run()
......
......@@ -105,7 +105,6 @@ def main():
coupler.run()
# Adjoint problem
isol.adjointSolver.run()
adj.run()
tms['total'].stop()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment