Residuals: Updated from a GeometricMeshObject to a UpdateableMeshObject
so that the stack of residuals is maintained following any kind of mesh change. Resolves bug-report https://bugs.openfoam.org/view.php?id=4034
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) 2019-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2019-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -34,7 +34,7 @@ Foam::Residuals<Type>::Residuals(const polyMesh& mesh)
|
||||
DemandDrivenMeshObject
|
||||
<
|
||||
polyMesh,
|
||||
GeometricMeshObject,
|
||||
UpdateableMeshObject,
|
||||
Residuals<Type>
|
||||
>(mesh),
|
||||
prevTimeIndex_(-1)
|
||||
@ -49,7 +49,7 @@ Foam::List<Foam::word> Foam::Residuals<Type>::fieldNames(const polyMesh& mesh)
|
||||
return DemandDrivenMeshObject
|
||||
<
|
||||
polyMesh,
|
||||
GeometricMeshObject,
|
||||
UpdateableMeshObject,
|
||||
Residuals<Type>
|
||||
>::New
|
||||
(
|
||||
@ -64,7 +64,7 @@ bool Foam::Residuals<Type>::found(const polyMesh& mesh, const word& fieldName)
|
||||
return DemandDrivenMeshObject
|
||||
<
|
||||
polyMesh,
|
||||
GeometricMeshObject,
|
||||
UpdateableMeshObject,
|
||||
Residuals<Type>
|
||||
>::New
|
||||
(
|
||||
@ -84,7 +84,7 @@ Foam::Residuals<Type>::field
|
||||
return DemandDrivenMeshObject
|
||||
<
|
||||
polyMesh,
|
||||
GeometricMeshObject,
|
||||
UpdateableMeshObject,
|
||||
Residuals<Type>
|
||||
>::New
|
||||
(
|
||||
@ -105,7 +105,7 @@ void Foam::Residuals<Type>::append
|
||||
DemandDrivenMeshObject
|
||||
<
|
||||
polyMesh,
|
||||
GeometricMeshObject,
|
||||
UpdateableMeshObject,
|
||||
Residuals<Type>
|
||||
>::New
|
||||
(
|
||||
@ -142,4 +142,26 @@ void Foam::Residuals<Type>::append
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
bool Foam::Residuals<Type>::movePoints()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::Residuals<Type>::distribute(const polyDistributionMap&)
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::Residuals<Type>::topoChange(const polyTopoChangeMap&)
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::Residuals<Type>::mapMesh(const polyMeshMap&)
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2019-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -55,7 +55,7 @@ class Residuals
|
||||
public DemandDrivenMeshObject
|
||||
<
|
||||
polyMesh,
|
||||
GeometricMeshObject,
|
||||
UpdateableMeshObject,
|
||||
Residuals<Type>
|
||||
>,
|
||||
public HashTable<DynamicList<SolverPerformance<Type>>>
|
||||
@ -71,7 +71,7 @@ protected:
|
||||
friend class DemandDrivenMeshObject
|
||||
<
|
||||
polyMesh,
|
||||
GeometricMeshObject,
|
||||
UpdateableMeshObject,
|
||||
Residuals<Type>
|
||||
>;
|
||||
|
||||
@ -117,6 +117,18 @@ public:
|
||||
const SolverPerformance<Type>&
|
||||
);
|
||||
|
||||
//- Update for mesh motion
|
||||
virtual bool movePoints();
|
||||
|
||||
//- Redistribute or update using the given distribution map
|
||||
virtual void distribute(const polyDistributionMap& map);
|
||||
|
||||
//- Update topology using the given map
|
||||
virtual void topoChange(const polyTopoChangeMap& map);
|
||||
|
||||
//- Update from another mesh using the given map
|
||||
virtual void mapMesh(const polyMeshMap& map);
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
@ -135,7 +147,6 @@ public:
|
||||
#include "Residuals.C"
|
||||
#endif
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user