mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Removing IO from IOdictionaries.
This commit is contained in:
@ -49,7 +49,7 @@ int main(int argc, char *argv[])
|
|||||||
"cvMeshDict",
|
"cvMeshDict",
|
||||||
runTime.system(),
|
runTime.system(),
|
||||||
runTime,
|
runTime,
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ_IF_MODIFIED,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -33,7 +33,7 @@ License
|
|||||||
Foam::conformalVoronoiMesh::conformalVoronoiMesh
|
Foam::conformalVoronoiMesh::conformalVoronoiMesh
|
||||||
(
|
(
|
||||||
const Time& runTime,
|
const Time& runTime,
|
||||||
const IOdictionary& cvMeshDict
|
const dictionary& cvMeshDict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
HTriangulation(),
|
HTriangulation(),
|
||||||
@ -519,7 +519,28 @@ void Foam::conformalVoronoiMesh::insertFlatEdgePointGroup
|
|||||||
const pointIndexHit& edHit
|
const pointIndexHit& edHit
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Info<< "NOT INSERTING FLAT EDGE POINT GROUP, NOT IMPLEMENTED" << endl;
|
const point& edgePt = edHit.hitPoint();
|
||||||
|
|
||||||
|
scalar ppDist = pointPairDistance(edgePt);
|
||||||
|
|
||||||
|
const vectorField& feNormals = feMesh.normals();
|
||||||
|
const labelList& edNormalIs = feMesh.edgeNormals()[edHit.index()];
|
||||||
|
|
||||||
|
// As this is a flat edge, there are two normals by definition
|
||||||
|
const vector& nA = feNormals[edNormalIs[0]];
|
||||||
|
const vector& nB = feNormals[edNormalIs[1]];
|
||||||
|
|
||||||
|
// Average normal to remove any bias to one side, although as this
|
||||||
|
// is a flat edge, the normals should be essentially the same
|
||||||
|
vector n = 0.5*(nA + nB);
|
||||||
|
|
||||||
|
// Direction along the surface to the control point, sense of edge
|
||||||
|
// direction not important, as +s and -s can be used because this
|
||||||
|
// is a flat edge
|
||||||
|
vector s = 2.0*ppDist*(feMesh.edgeDirections()[edHit.index()] ^ n);
|
||||||
|
|
||||||
|
insertPointPair(ppDist, edgePt + s, n);
|
||||||
|
insertPointPair(ppDist, edgePt - s, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -657,7 +657,7 @@ public:
|
|||||||
conformalVoronoiMesh
|
conformalVoronoiMesh
|
||||||
(
|
(
|
||||||
const Time& runTime,
|
const Time& runTime,
|
||||||
const IOdictionary& cvMeshDict
|
const dictionary& cvMeshDict
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@ License
|
|||||||
Foam::cvControls::cvControls
|
Foam::cvControls::cvControls
|
||||||
(
|
(
|
||||||
const conformalVoronoiMesh& cvMesh,
|
const conformalVoronoiMesh& cvMesh,
|
||||||
const IOdictionary& cvMeshDict
|
const dictionary& cvMeshDict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
cvMesh_(cvMesh),
|
cvMesh_(cvMesh),
|
||||||
|
|||||||
@ -35,7 +35,7 @@ SourceFiles
|
|||||||
#ifndef cvControls_H
|
#ifndef cvControls_H
|
||||||
#define cvControls_H
|
#define cvControls_H
|
||||||
|
|
||||||
#include "IOdictionary.H"
|
#include "dictionary.H"
|
||||||
#include "Switch.H"
|
#include "Switch.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -58,7 +58,7 @@ class cvControls
|
|||||||
const conformalVoronoiMesh& cvMesh_;
|
const conformalVoronoiMesh& cvMesh_;
|
||||||
|
|
||||||
//- Reference to the cvMeshDict
|
//- Reference to the cvMeshDict
|
||||||
const IOdictionary& cvMeshDict_;
|
const dictionary& cvMeshDict_;
|
||||||
|
|
||||||
// General parameters
|
// General parameters
|
||||||
|
|
||||||
@ -282,11 +282,11 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from references to conformalVoronoiMesh and IOdictionary
|
//- Construct from references to conformalVoronoiMesh and dictionary
|
||||||
cvControls
|
cvControls
|
||||||
(
|
(
|
||||||
const conformalVoronoiMesh& cvMesh,
|
const conformalVoronoiMesh& cvMesh,
|
||||||
const IOdictionary& cvMeshDict
|
const dictionary& cvMeshDict
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -299,7 +299,7 @@ public:
|
|||||||
// Access
|
// Access
|
||||||
|
|
||||||
//- Return the cvMeshDict
|
//- Return the cvMeshDict
|
||||||
inline const IOdictionary& cvMeshDict() const;
|
inline const dictionary& cvMeshDict() const;
|
||||||
|
|
||||||
//- Return the span
|
//- Return the span
|
||||||
inline scalar span() const;
|
inline scalar span() const;
|
||||||
|
|||||||
@ -25,7 +25,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline const Foam::IOdictionary& Foam::cvControls::cvMeshDict() const
|
inline const Foam::dictionary& Foam::cvControls::cvMeshDict() const
|
||||||
{
|
{
|
||||||
return cvMeshDict_;
|
return cvMeshDict_;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user