48 if (psi_.needReference())
50 if (Pstream::master())
52 internalCoeffs_[patchi][facei] +=
53 diag()[psi_.mesh().boundary()[patchi].faceCells()[facei]];
55 boundaryCoeffs_[patchi][facei] +=
56 diag()[psi_.mesh().boundary()[patchi].faceCells()[facei]]
71 if (psi_.mesh().name() != polyMesh::defaultRegion)
80 <<
"fvMatrix<scalar>::solver(const dictionary& solverControls) : "
81 "solver for fvMatrix<scalar>"
86 addBoundaryDiag(
diag(), 0);
89 psi_.boundaryField().scalarInterfaces();
97 lduMatrix::solver::New
125 solverPerformance::debug
135 fvMat_.addBoundaryDiag(fvMat_.diag(), 0);
138 fvMat_.addBoundarySource(totalSource,
false);
141 solver_->read(solverControls);
154 fvMat_.diag() = saveDiag;
173 <<
"fvMatrix<scalar>::solveSegregated"
174 "(const dictionary& solverControls) : "
175 "solving fvMatrix<scalar>"
183 solverPerformance::debug
243 for (label fieldi = 0; fieldi <
nMatrices(); fieldi++)
248 forAll(psiInternal, localCellI)
250 psi[cellOffset + localCellI] = psiInternal[localCellI];
265 )->solve(
psi, totalSource);
269 for (label fieldi = 0; fieldi <
nMatrices(); fieldi++)
279 forAll(psiInternal, localCellI)
281 psiInternal[localCellI] =
psi[localCellI + cellOffset];
311 for (label fieldi = 0; fieldi <
nMatrices(); fieldi++)
320 localPsi.mesh().setSolverPerformance(localPsi.name(), solverPerf);
342 source_ - boundaryDiag*psif,
365 "H("+psi_.
name()+
')',
373 extrapolatedCalculatedFvPatchScalarField::typeName
405 extrapolatedCalculatedFvPatchScalarField::typeName
A const Field/List wrapper with possible data conversion.
const dimensionSet & dimensions() const
Return dimensions.
const Mesh & mesh() const
Return mesh.
lduInterfaceFieldPtrsList scalarInterfaces() const
Generic GeometricField class.
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
void correctBoundaryConditions()
Correct boundary field.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const word & name() const noexcept
Return the object name.
const fileName & instance() const noexcept
Read access to instance path component.
void setSize(const label n)
Alias for resize()
A dynamically resizable PtrList with allocation management.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
void size(const label n)
Older name for setAddressableSize.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
void setSolverPerformance(const word &name, const SolverPerformance< Type > &sp) const
Add/set the solverPerformance entry for the named field.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
tmp< GeometricField< Type, faPatchField, areaMesh > > H() const
Return the H operation source.
tmp< Field< Type > > residual() const
Return the matrix residual.
SolverPerformance< Type > solve()
Solve returning the solution statistics.
autoPtr< fvSolver > solver()
Construct and return the solver.
void manipulateMatrix(direction cmp)
Manipulate matrix.
void transferFvMatrixCoeffs()
Transfer lower, upper, diag and source to this fvMatrix.
tmp< volScalarField > H1() const
Return H(1)
void createOrUpdateLduPrimitiveAssembly()
Create or update ldu assembly.
void addBoundarySource(Field< Type > &source, const bool couples=true) const
void setComponentReference(const label patchi, const label facei, const direction cmpt, const scalar value)
void setInterfaces(lduInterfaceFieldPtrsList &, PtrDynList< lduInterfaceField > &newInterfaces)
Set interfaces.
tmp< GeometricField< Type, fvPatchField, volMesh > > H() const
Return the H operation source.
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.
lduPrimitiveMeshAssembly * lduMeshPtr()
Access to lduPrimitiveMeshAssembly.
void setBounAndInterCoeffs()
Manipulate boundary/internal coeffs for coupling.
tmp< scalarField > H1() const
const lduAddressing & lduAddr() const
Return the LDU addressing.
void setLduMesh(const lduMesh &m)
Set the LDU mesh containing the addressing is obtained.
const lduMesh & mesh() const
Return the LDU mesh from which the addressing is obtained.
const labelList & cellOffsets() const
Return cellOffsets.
OSstream & masterStream(const label communicator)
bool fluxRequired(const word &name) const
Set flux-required for given name (mutable)
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
const volScalarField & psi
Foam::word regionName(Foam::polyMesh::defaultRegion)
A scalar instance of fvMatrix.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
const dimensionSet dimVol(dimVolume)
Older spelling for dimVolume.
#define addProfiling(name, descr)
Define profiling trigger with specified name and description string.
#define forAll(list, i)
Loop across all elements in list.
conserve primitiveFieldRef()+