Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
59227192
Commit
59227192
authored
Jul 21, 2011
by
mattijs
Browse files
ENH: polyMesh: remove support for read in cellCentres
parent
9ff346bb
Changes
4
Hide whitespace changes
Inline
Side-by-side
applications/utilities/mesh/manipulation/checkMesh/checkMesh.C
View file @
59227192
...
...
@@ -91,26 +91,6 @@ int main(int argc, char *argv[])
// Clear mesh before checking
mesh
.
clearOut
();
pointIOField
overrideCCs
(
IOobject
(
"cellCentres"
,
mesh
.
pointsInstance
(),
polyMesh
::
meshSubDir
,
runTime
,
IOobject
::
READ_IF_PRESENT
,
IOobject
::
NO_WRITE
)
);
if
(
overrideCCs
.
headerOk
())
{
Info
<<
"Read "
<<
overrideCCs
.
size
()
<<
" cell centres"
<<
endl
;
mesh
.
overrideCellCentres
(
overrideCCs
);
}
// Reconstruct globalMeshData
mesh
.
globalData
();
...
...
src/OpenFOAM/meshes/polyMesh/polyMesh.C
View file @
59227192
...
...
@@ -295,31 +295,6 @@ Foam::polyMesh::polyMesh(const IOobject& io)
neighbour_
.
write
();
}
// Read cell centres if present
pointIOField
cellCentres
(
IOobject
(
"cellCentres"
,
time
().
findInstance
(
meshDir
(),
"cellCentres"
,
IOobject
::
READ_IF_PRESENT
),
meshSubDir
,
*
this
,
IOobject
::
READ_IF_PRESENT
,
IOobject
::
NO_WRITE
)
);
if
(
cellCentres
.
headerOk
())
{
Pout
<<
"Reading cell centres"
<<
endl
;
overrideCellCentres
(
cellCentres
);
}
// Calculate topology for the patches (processor-processor comms etc.)
boundary_
.
updateMesh
();
...
...
src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H
View file @
59227192
...
...
@@ -496,12 +496,6 @@ public:
const
scalarField
&
cellVolumes
()
const
;
const
vectorField
&
faceAreas
()
const
;
// Override cell centres with supplied positions
void
overrideCellCentres
(
const
vectorField
&
cellCtrs
)
const
;
// Mesh motion
...
...
src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellCentresAndVols.C
View file @
59227192
...
...
@@ -28,7 +28,6 @@ Description
\*---------------------------------------------------------------------------*/
#include
"primitiveMesh.H"
#include
"demandDrivenData.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
...
...
@@ -169,66 +168,4 @@ const Foam::scalarField& Foam::primitiveMesh::cellVolumes() const
}
void
Foam
::
primitiveMesh
::
overrideCellCentres
(
const
vectorField
&
newCellCtrs
)
const
{
if
(
newCellCtrs
.
size
()
!=
nCells
())
{
FatalErrorIn
(
"void Foam::primitiveMesh::overrideCellCentres"
"("
"const vectorField& newCellCtrs"
") const"
)
<<
"Size of new cell centres for override "
<<
newCellCtrs
.
size
()
<<
" not equal to the number of cells in the mesh "
<<
nCells
()
<<
abort
(
FatalError
);
}
if
(
debug
)
{
Pout
<<
"void Foam::primitiveMesh::overrideCellCentres"
<<
"(const vectorField& newCellCtrs) const : "
<<
"overriding cell centres."
<<
endl
;
}
deleteDemandDrivenData
(
cellCentresPtr_
);
deleteDemandDrivenData
(
cellVolumesPtr_
);
// Calculate the cell volumes - these are invariant with respect
// to the centre.
calcCellCentresAndVols
();
*
cellCentresPtr_
=
newCellCtrs
;
// Set internal face centres to the midpoint of the cell-centre delta vector
// if (debug)
// {
// Pout<< "void Foam::primitiveMesh::overrideCellCentres"
// << "(const vectorField& newCellCtrs) const : "
// << "overriding internal face centres." << endl;
// }
// deleteDemandDrivenData(faceCentresPtr_);
// deleteDemandDrivenData(faceAreasPtr_);
// calcFaceCentresAndAreas();
// vectorField& fCtrs = *faceCentresPtr_;
// const vectorField& C = cellCentres();
// const labelUList& owner = faceOwner();
// const labelUList& neighbour = faceNeighbour();
// forAll(neighbour, faceI)
// {
// fCtrs[faceI] = 0.5*(C[neighbour[faceI]] + C[owner[faceI]]);
// }
}
// ************************************************************************* //
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment