mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: da is appended by the adjoint solver name
if useSolverNameForFields is set to true. This facilitates continuation.
This commit is contained in:
committed by
Andrew Heather
parent
95748b0183
commit
36159cb16d
@ -65,7 +65,7 @@ void FIBase::read()
|
||||
mesh_,
|
||||
dict_,
|
||||
primalVars_.RASModelVariables(),
|
||||
adjointVars_.adjointTurbulence(),
|
||||
adjointVars_,
|
||||
sensitivityPatchIDs_
|
||||
)
|
||||
);
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2007-2019 PCOpt/NTUA
|
||||
Copyright (C) 2013-2019 FOSS GP
|
||||
Copyright (C) 2007-2020 PCOpt/NTUA
|
||||
Copyright (C) 2013-2020 FOSS GP
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -114,14 +114,14 @@ adjointEikonalSolver::adjointEikonalSolver
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict,
|
||||
const autoPtr<incompressible::RASModelVariables>& RASModelVars,
|
||||
autoPtr<Foam::incompressibleAdjoint::adjointRASModel>& adjointTurbulence,
|
||||
incompressibleAdjointVars& adjointVars,
|
||||
const labelHashSet& sensitivityPatchIDs
|
||||
)
|
||||
:
|
||||
mesh_(mesh),
|
||||
dict_(dict.subOrEmptyDict("adjointEikonalSolver")),
|
||||
RASModelVars_(RASModelVars),
|
||||
adjointTurbulence_(adjointTurbulence),
|
||||
adjointTurbulence_(adjointVars.adjointTurbulence()),
|
||||
sensitivityPatchIDs_(sensitivityPatchIDs),
|
||||
nEikonalIters_(-1),
|
||||
tolerance_(-1),
|
||||
@ -131,7 +131,12 @@ adjointEikonalSolver::adjointEikonalSolver
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"da",
|
||||
word
|
||||
(
|
||||
adjointVars.useSolverNameForFields() ?
|
||||
"da" + adjointTurbulence_().adjointSolverName() :
|
||||
"da"
|
||||
),
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
@ -217,7 +222,10 @@ void adjointEikonalSolver::solve()
|
||||
break;
|
||||
}
|
||||
}
|
||||
da_.write();
|
||||
if (debug)
|
||||
{
|
||||
da_.write();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -127,7 +127,7 @@ SourceFiles
|
||||
#define adjointEikonalSolverIncompressible_H
|
||||
|
||||
#include "IOdictionary.H"
|
||||
#include "adjointRASModel.H"
|
||||
#include "incompressibleAdjointVars.H"
|
||||
#include "createZeroField.H"
|
||||
#include "boundaryFieldsFwd.H"
|
||||
#include "RASModelVariables.H"
|
||||
@ -215,8 +215,7 @@ public:
|
||||
const fvMesh& mesh,
|
||||
const dictionary& dict,
|
||||
const autoPtr<incompressible::RASModelVariables>& RASModelVars,
|
||||
autoPtr<Foam::incompressibleAdjoint::adjointRASModel>&
|
||||
adjointTurbulence,
|
||||
incompressibleAdjointVars& adjointVars,
|
||||
const labelHashSet& sensitivityPatchIDs
|
||||
);
|
||||
|
||||
|
||||
@ -357,7 +357,7 @@ void sensitivitySurface::read()
|
||||
mesh_,
|
||||
dict_,
|
||||
primalVars_.RASModelVariables(),
|
||||
adjointVars_.adjointTurbulence(),
|
||||
adjointVars_,
|
||||
sensitivityPatchIDs_
|
||||
)
|
||||
);
|
||||
|
||||
@ -86,7 +86,7 @@ void sensitivitySurfacePoints::read()
|
||||
mesh_,
|
||||
dict(),
|
||||
primalVars_.RASModelVariables(),
|
||||
adjointVars_.adjointTurbulence(),
|
||||
adjointVars_,
|
||||
sensitivityPatchIDs_
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user