mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
added boundaryManipulate function
This commit is contained in:
@ -456,10 +456,10 @@ void Foam::fvMatrix<Type>::setValues
|
||||
|
||||
if (internalCoeffs_[patchi].size())
|
||||
{
|
||||
label patchFacei =
|
||||
label patchFacei =
|
||||
mesh.boundaryMesh()[patchi].whichFace(facei);
|
||||
|
||||
internalCoeffs_[patchi][patchFacei] =
|
||||
internalCoeffs_[patchi][patchFacei] =
|
||||
pTraits<Type>::zero;
|
||||
|
||||
boundaryCoeffs_[patchi][patchFacei] =
|
||||
@ -591,6 +591,20 @@ void Foam::fvMatrix<Type>::relax()
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::fvMatrix<Type>::boundaryManipulate
|
||||
(
|
||||
typename GeometricField<Type, fvPatchField, volMesh>::
|
||||
GeometricBoundaryField& bFields
|
||||
)
|
||||
{
|
||||
forAll(bFields, patchI)
|
||||
{
|
||||
bFields[patchI].manipulateMatrix(*this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::scalarField> Foam::fvMatrix<Type>::D() const
|
||||
{
|
||||
@ -653,7 +667,7 @@ Foam::tmp<Foam::volScalarField> Foam::fvMatrix<Type>::A() const
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
|
||||
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
|
||||
Foam::fvMatrix<Type>::H() const
|
||||
{
|
||||
tmp<GeometricField<Type, fvPatchField, volMesh> > tHphi
|
||||
@ -838,7 +852,7 @@ flux() const
|
||||
|
||||
forAll(fieldFlux.boundaryField(), patchI)
|
||||
{
|
||||
fieldFlux.boundaryField()[patchI] =
|
||||
fieldFlux.boundaryField()[patchI] =
|
||||
InternalContrib[patchI] - NeighbourContrib[patchI];
|
||||
}
|
||||
|
||||
@ -1255,7 +1269,7 @@ Foam::lduMatrix::solverPerformance Foam::solve
|
||||
Istream& solverControls
|
||||
)
|
||||
{
|
||||
lduMatrix::solverPerformance solverPerf =
|
||||
lduMatrix::solverPerformance solverPerf =
|
||||
const_cast<fvMatrix<Type>&>(tfvm()).solve(solverControls);
|
||||
|
||||
tfvm.clear();
|
||||
|
||||
@ -350,6 +350,13 @@ public:
|
||||
// alpha is read from controlDict
|
||||
void relax();
|
||||
|
||||
//- Manipulate based on a boundary field
|
||||
void boundaryManipulate
|
||||
(
|
||||
typename GeometricField<Type, fvPatchField, volMesh>::
|
||||
GeometricBoundaryField& values
|
||||
);
|
||||
|
||||
//- Construct and return the solver
|
||||
// Solver controls read from Istream
|
||||
autoPtr<fvSolver> solver(Istream&);
|
||||
@ -386,7 +393,7 @@ public:
|
||||
|
||||
//- Return the face-flux field from the matrix
|
||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
|
||||
flux() const;
|
||||
flux() const;
|
||||
|
||||
|
||||
// Member operators
|
||||
|
||||
Reference in New Issue
Block a user