41 if (psi_.needReference())
43 if (Pstream::master())
45 internalCoeffs_[
patchi][facei] +=
46 diag()[psi_.mesh().boundary()[
patchi].faceCells()[facei]];
48 boundaryCoeffs_[
patchi][facei] +=
49 diag()[psi_.mesh().boundary()[
patchi].faceCells()[facei]]
65 Info(this->mesh().comm())
66 <<
"fvMatrix<scalar>::solver(const dictionary& solverControls) : "
67 "solver for fvMatrix<scalar>"
72 addBoundaryDiag(
diag(), 0);
85 psi_.boundaryField().scalarInterfaces(),
108 fvMat_.addBoundaryDiag(fvMat_.diag(), 0);
111 fvMat_.addBoundarySource(totalSource,
false);
114 solver_->read(solverControls);
118 psi.primitiveFieldRef(),
122 if (solverPerformance::debug)
124 solverPerf.
print(
Info(fvMat_.mesh().comm()));
127 fvMat_.diag() = saveDiag;
129 psi.correctBoundaryConditions();
146 <<
"fvMatrix<scalar>::solveSegregated"
147 "(const dictionary& solverControls) : "
148 "solving fvMatrix<scalar>"
168 psi_.boundaryField().scalarInterfaces(),
170 )->solve(
psi.primitiveFieldRef(), totalSource);
172 if (solverPerformance::debug)
179 psi.correctBoundaryConditions();
197 psi_.primitiveField(),
198 source_ - boundaryDiag*psi_.primitiveField(),
200 psi_.boundaryField().scalarInterfaces(),
218 "H("+psi_.name()+
')',
221 extrapolatedCalculatedFvPatchScalarField::typeName
245 dimensions_/(
dimVolume*psi_.dimensions()),
246 extrapolatedCalculatedFvPatchScalarField::typeName
Generic GeometricField class.
Internal::FieldType & primitiveFieldRef()
Return a reference to the primitive field.
void correctBoundaryConditions()
Correct boundary field.
static tmp< GeometricField< Type, PatchField, GeoMesh > > New(const word &name, const Internal &, const PtrList< PatchField< Type >> &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
static void append(const polyMesh &mesh, const SolverPerformance< Type > &)
Append the given solver performance residuals.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A list of keyword definitions, which are a keyword followed by any number of values (e....
Solver class returned by the solver function.
SolverPerformance< Type > solve()
Solve returning the solution statistics.
autoPtr< fvSolver > solver()
Construct and return the solver.
tmp< volScalarField > H1() const
Return H(1)
tmp< VolField< Type > > H() const
Return the H operation source.
void addBoundarySource(Field< Type > &source, const bool couples=true) const
void setComponentReference(const label patchi, const label facei, const direction cmpt, const scalar value)
Set reference level for a component of the solution.
tmp< Field< Type > > residual() const
Return the matrix residual.
void addBoundaryDiag(scalarField &diag, const direction cmpt) const
SolverPerformance< Type > solveSegregated(const dictionary &)
Solve segregated returning the solution statistics.
static autoPtr< solver > New(const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls)
Return a new solver.
tmp< scalarField > H1() const
void residual(scalarField &rA, const scalarField &psi, const scalarField &source, const FieldField< Field, scalar > &interfaceBouCoeffs, const lduInterfaceFieldPtrsList &interfaces, const direction cmpt) const
const lduMesh & mesh() const
Return the LDU mesh from which the addressing is obtained.
tmp< Field< Type > > H(const Field< Type > &) const
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
A scalar instance of fvMatrix.
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
const dimensionSet dimVolume