fvMesh: Register V, Sf, magSf, C and Cf fields
required modification of fvMeshDistributors to ensure these sliced fields are deleted before distribution.
This commit is contained in:
@ -807,6 +807,7 @@ void Foam::fvMeshSubset::setCellSubset
|
||||
|
||||
// Delete any old mesh
|
||||
fvMeshSubsetPtr_.clear();
|
||||
|
||||
// Make a new mesh
|
||||
fvMeshSubsetPtr_.reset
|
||||
(
|
||||
|
||||
@ -168,7 +168,7 @@ private:
|
||||
// will take care of the old-time levels.
|
||||
mutable label curTimeIndex_;
|
||||
|
||||
//- Cell volumes old time level
|
||||
//- Cell volumes
|
||||
mutable SlicedDimensionedField<scalar, volMesh>* VPtr_;
|
||||
|
||||
//- Cell volumes old time level
|
||||
@ -316,6 +316,7 @@ public:
|
||||
typedef fvBoundaryMesh BoundaryMesh;
|
||||
|
||||
friend fvMeshTopoChangers::list;
|
||||
friend fvMeshDistributor;
|
||||
|
||||
// Declare name of the class and its debug switch
|
||||
ClassName("fvMesh");
|
||||
|
||||
@ -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-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -91,4 +91,12 @@ void Foam::fvMeshDistributor::velocityMotionCorrection::update() const
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool Foam::fvMeshDistributor::update()
|
||||
{
|
||||
mesh_.clearGeomNotOldVol();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -154,7 +154,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
//- Update the mesh for both mesh motion and topology change
|
||||
//- Update the mesh
|
||||
virtual bool update() = 0;
|
||||
|
||||
//- Update corresponding to the given map
|
||||
|
||||
@ -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-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -60,7 +60,7 @@ void Foam::fvMesh::makeSf() const
|
||||
*this,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
true
|
||||
),
|
||||
*this,
|
||||
dimArea,
|
||||
@ -95,7 +95,7 @@ void Foam::fvMesh::makeMagSf() const
|
||||
*this,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
true
|
||||
),
|
||||
*this,
|
||||
dimArea,
|
||||
@ -132,7 +132,7 @@ void Foam::fvMesh::makeC() const
|
||||
*this,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
true
|
||||
),
|
||||
*this,
|
||||
dimLength,
|
||||
@ -170,7 +170,7 @@ void Foam::fvMesh::makeCf() const
|
||||
*this,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
true
|
||||
),
|
||||
*this,
|
||||
dimLength,
|
||||
@ -276,7 +276,7 @@ const Foam::volScalarField::Internal& Foam::fvMesh::V() const
|
||||
*this,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
true
|
||||
),
|
||||
*this,
|
||||
dimVolume,
|
||||
|
||||
@ -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-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -70,6 +70,9 @@ void Foam::fvMeshDistributors::distributor::distribute
|
||||
// Mesh distribution engine
|
||||
fvMeshDistribute distributor(mesh);
|
||||
|
||||
// Clear sliced and other non-distributable mesh data
|
||||
fvMeshDistributor::update();
|
||||
|
||||
// Do actual sending/receiving of mesh
|
||||
autoPtr<polyDistributionMap> map
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user