32 template<
class returnType,
class sourceType,
class castType>
38 bool (castType::*hasFunction)()
const 43 auto& dJtotdvar = tdJtotdvar.ref();
46 for (sourceType& funcI : sourceList)
48 castType& cfuncI = refCast<castType>(funcI);
49 if ((cfuncI.*hasFunction)())
53 dJtotdvar += cfuncI.weight()*dJdvar;
static autoPtr< boundaryAdjointContribution > New(const word &managerName, const word &adjointSolverName, const word &simulationType, const fvPatch &patch)
Return a reference to the selected turbulence model.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual label size() const
Patch size is the number of faces, but can be overloaded.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
A class for managing temporary objects.
tmp< Field< returnType > > sumContributions(PtrList< sourceType > &sourceList, const fvPatchField< returnType > &(castType::*boundaryFunction)(const label), bool(castType::*hasFunction)() const)
label index() const noexcept
The index of this patch in the boundary mesh.
static constexpr const zero Zero
Global zero (0)