fvPatch: Removed movePoints
The FV patches don't hold any data that requires updating. If they did, then they would require a full set of mesh change hooks (i.e., topoChange, distribute, and mesh mapping, as well as move). The poly patches currently hold all of this sort of data, and have a complete system of methods to handle mesh changes.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -97,20 +97,6 @@ Foam::labelList Foam::fvBoundaryMesh::findIndices
|
||||
}
|
||||
|
||||
|
||||
void Foam::fvBoundaryMesh::movePoints()
|
||||
{
|
||||
forAll(*this, patchi)
|
||||
{
|
||||
operator[](patchi).initMovePoints();
|
||||
}
|
||||
|
||||
forAll(*this, patchi)
|
||||
{
|
||||
operator[](patchi).movePoints();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::fvBoundaryMesh::shuffle
|
||||
(
|
||||
const labelUList& newToOld,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -113,9 +113,6 @@ public:
|
||||
labelList findIndices(const wordRe&, const bool useGroups) const;
|
||||
|
||||
|
||||
//- Correct patches after moving points
|
||||
void movePoints();
|
||||
|
||||
//- Reorders patches. Ordering does not have to be done in
|
||||
// ascending or descending order. Reordering has to be unique.
|
||||
// (is shuffle). If validBoundary call needs to be parallel
|
||||
|
||||
@ -1089,7 +1089,6 @@ void Foam::fvMesh::setPoints(const pointField& p)
|
||||
clearGeom();
|
||||
|
||||
// Update other local data
|
||||
boundary_.movePoints();
|
||||
surfaceInterpolation::movePoints();
|
||||
|
||||
meshObjects::movePoints<fvMesh>(*this);
|
||||
@ -1211,7 +1210,6 @@ Foam::tmp<Foam::scalarField> Foam::fvMesh::movePoints(const pointField& p)
|
||||
updateGeomNotOldVol();
|
||||
|
||||
// Update other local data
|
||||
boundary_.movePoints();
|
||||
surfaceInterpolation::movePoints();
|
||||
|
||||
meshObjects::movePoints<fvMesh>(*this);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -56,13 +56,10 @@ class coupledFvPatch
|
||||
{
|
||||
// Private Data
|
||||
|
||||
//- Reference to the coupled polyPatch
|
||||
const coupledPolyPatch& coupledPolyPatch_;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
protected:
|
||||
|
||||
// Protected Member functions
|
||||
@ -75,21 +72,12 @@ protected:
|
||||
const vectorField& nbrDelta
|
||||
) const;
|
||||
|
||||
//- Make patch weighting factors
|
||||
virtual void makeWeights(scalarField& w) const = 0;
|
||||
|
||||
//- Return delta (P to N) vectors across coupled patch
|
||||
tmp<vectorField> delta
|
||||
(
|
||||
const vectorField& nbrDelta
|
||||
) const;
|
||||
tmp<vectorField> delta(const vectorField& nbrDelta) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
friend class surfaceInterpolation;
|
||||
|
||||
|
||||
//- Runtime type information
|
||||
TypeName(coupledPolyPatch::typeName_());
|
||||
|
||||
@ -139,6 +127,9 @@ public:
|
||||
return fvPatch::faceCells();
|
||||
}
|
||||
|
||||
//- Make patch weighting factors
|
||||
virtual void makeWeights(scalarField& w) const = 0;
|
||||
|
||||
//- Return delta (P to N) vectors across coupled patch
|
||||
virtual tmp<vectorField> delta() const = 0;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2021-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -38,19 +38,6 @@ namespace Foam
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::nonConformalCyclicFvPatch::makeWeights(scalarField& w) const
|
||||
{
|
||||
nonConformalCoupledFvPatch::makeWeights
|
||||
(
|
||||
w,
|
||||
nbrPatch().Sf(),
|
||||
nbrPatch().coupledFvPatch::delta()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::nonConformalCyclicFvPatch::nonConformalCyclicFvPatch
|
||||
@ -114,6 +101,17 @@ const Foam::labelUList& Foam::nonConformalCyclicFvPatch::faceCells() const
|
||||
}
|
||||
|
||||
|
||||
void Foam::nonConformalCyclicFvPatch::makeWeights(scalarField& w) const
|
||||
{
|
||||
nonConformalCoupledFvPatch::makeWeights
|
||||
(
|
||||
w,
|
||||
nbrPatch().Sf(),
|
||||
nbrPatch().coupledFvPatch::delta()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::vectorField>
|
||||
Foam::nonConformalCyclicFvPatch::delta() const
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2021-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -66,14 +66,6 @@ class nonConformalCyclicFvPatch
|
||||
const nonConformalCyclicPolyPatch& nonConformalCyclicPolyPatch_;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected Member functions
|
||||
|
||||
//- Make patch weighting factors
|
||||
void makeWeights(scalarField&) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
@ -132,6 +124,9 @@ public:
|
||||
virtual const labelUList& faceCells() const;
|
||||
|
||||
|
||||
//- Make patch weighting factors
|
||||
void makeWeights(scalarField&) const;
|
||||
|
||||
//- Return delta (P to N) vectors across coupled patch
|
||||
virtual tmp<vectorField> delta() const;
|
||||
};
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -42,27 +42,6 @@ namespace Foam
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::nonConformalProcessorCyclicFvPatch::makeWeights(scalarField& w) const
|
||||
{
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
nonConformalCoupledFvPatch::makeWeights
|
||||
(
|
||||
w,
|
||||
- boundaryMesh().mesh().Sf().boundaryField()[index()],
|
||||
boundaryMesh().mesh().Cf().boundaryField()[index()]
|
||||
- boundaryMesh().mesh().C().boundaryField()[index()]
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
w = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::nonConformalProcessorCyclicFvPatch::nonConformalProcessorCyclicFvPatch
|
||||
@ -121,6 +100,25 @@ Foam::nonConformalProcessorCyclicFvPatch::faceCells() const
|
||||
}
|
||||
|
||||
|
||||
void Foam::nonConformalProcessorCyclicFvPatch::makeWeights(scalarField& w) const
|
||||
{
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
nonConformalCoupledFvPatch::makeWeights
|
||||
(
|
||||
w,
|
||||
- boundaryMesh().mesh().Sf().boundaryField()[index()],
|
||||
boundaryMesh().mesh().Cf().boundaryField()[index()]
|
||||
- boundaryMesh().mesh().C().boundaryField()[index()]
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
w = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::vectorField>
|
||||
Foam::nonConformalProcessorCyclicFvPatch::delta() const
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -65,14 +65,6 @@ class nonConformalProcessorCyclicFvPatch
|
||||
nonConformalProcessorCyclicPolyPatch_;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected Member functions
|
||||
|
||||
//- Make patch weighting factors
|
||||
virtual void makeWeights(scalarField& w) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
@ -129,6 +121,9 @@ public:
|
||||
virtual const labelUList& faceCells() const;
|
||||
|
||||
|
||||
//- Make patch weighting factors
|
||||
virtual void makeWeights(scalarField& w) const;
|
||||
|
||||
//- Return delta (P to N) vectors across coupled patch
|
||||
virtual tmp<vectorField> delta() const;
|
||||
};
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -36,7 +36,7 @@ namespace Foam
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::processorFvPatch::makeWeights(scalarField& w) const
|
||||
{
|
||||
@ -57,8 +57,6 @@ void Foam::processorFvPatch::makeWeights(scalarField& w) const
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::vectorField> Foam::processorFvPatch::delta() const
|
||||
{
|
||||
if (Pstream::parRun())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -55,17 +55,10 @@ class processorFvPatch
|
||||
{
|
||||
// Private Data
|
||||
|
||||
//- Reference to the processor polyPatch
|
||||
const processorPolyPatch& procPolyPatch_;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected Member functions
|
||||
|
||||
//- Make patch weighting factors
|
||||
virtual void makeWeights(scalarField& w) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
@ -127,6 +120,9 @@ public:
|
||||
return procPolyPatch_.transform();
|
||||
}
|
||||
|
||||
//- Make patch weighting factors
|
||||
virtual void makeWeights(scalarField& w) const;
|
||||
|
||||
//- Return delta (P to N) vectors across coupled patch
|
||||
virtual tmp<vectorField> delta() const;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -173,14 +173,6 @@ void Foam::fvPatch::makeWeights(scalarField& w) const
|
||||
}
|
||||
|
||||
|
||||
void Foam::fvPatch::initMovePoints()
|
||||
{}
|
||||
|
||||
|
||||
void Foam::fvPatch::movePoints()
|
||||
{}
|
||||
|
||||
|
||||
const Foam::scalarField& Foam::fvPatch::deltaCoeffs() const
|
||||
{
|
||||
return boundaryMesh().mesh().deltaCoeffs().boundaryField()[index()];
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -72,28 +72,8 @@ class fvPatch
|
||||
const fvBoundaryMesh& boundaryMesh_;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Make patch weighting factors
|
||||
virtual void makeWeights(scalarField&) const;
|
||||
|
||||
//- Initialise the patches for moving points
|
||||
virtual void initMovePoints();
|
||||
|
||||
//- Correct patches after moving points
|
||||
virtual void movePoints();
|
||||
|
||||
|
||||
public:
|
||||
|
||||
typedef fvBoundaryMesh BoundaryMesh;
|
||||
|
||||
friend class fvBoundaryMesh;
|
||||
friend class surfaceInterpolation;
|
||||
|
||||
|
||||
//- Runtime type information
|
||||
TypeName(polyPatch::typeName_());
|
||||
|
||||
@ -229,6 +209,9 @@ public:
|
||||
|
||||
// Access functions for demand driven data
|
||||
|
||||
//- Make patch weighting factors
|
||||
virtual void makeWeights(scalarField&) const;
|
||||
|
||||
//- Return patch weighting factors
|
||||
const scalarField& weights() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user