MRG: Integrated Foundation code to commit ba4dbed

This commit is contained in:
Andrew Heather
2017-03-23 12:11:49 +00:00
157 changed files with 1051 additions and 1718 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -155,9 +155,7 @@ public:
//- Update the rotation for a list of cells
virtual void updateCells(const polyMesh&, const labelList&)
{
// do nothing
}
{}
//- Return local-to-global transformation tensor
virtual const tensor& R() const

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -147,9 +147,7 @@ public:
//- Update the rotation for a list of cells
virtual void updateCells(const polyMesh&, const labelList&)
{
// do nothing
}
{}
//- Return local-to-global transformation tensor
virtual const tensor& R() const

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -141,9 +141,7 @@ public:
//- Update the rotation for a list of cells
virtual void updateCells(const polyMesh&, const labelList&)
{
// Do nothing
}
{}
//- Return local-to-global transformation tensor
virtual const tensor& R() const

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -28,13 +28,16 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
const Foam::primitiveMesh* const Foam::edgeFaceCirculator::endConstIterMeshPtr
= nullptr;
const Foam::edgeFaceCirculator Foam::edgeFaceCirculator::endConstIter
(
*reinterpret_cast<primitiveMesh*>(0), // primitiveMesh
-1, // faceLabel
false, // ownerSide
-1, // index
false // isBoundaryEdge
*Foam::edgeFaceCirculator::endConstIterMeshPtr, // primitiveMesh
-1, // faceLabel
false, // ownerSide
-1, // index
false // isBoundaryEdge
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -88,6 +88,9 @@ class edgeFaceCirculator
{
// Static data members
//- End iterator primitiveMesh nullptr
static const primitiveMesh* const endConstIterMeshPtr;
//- End iterator
static const edgeFaceCirculator endConstIter;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation | Copyright 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
@ -35,9 +35,9 @@ License
namespace Foam
{
defineTypeNameAndDebug(meshSearch, 0);
defineTypeNameAndDebug(meshSearch, 0);
scalar meshSearch::tol_ = 1e-3;
scalar meshSearch::tol_ = 1e-3;
}
@ -117,7 +117,6 @@ Foam::label Foam::meshSearch::findNearestCellTree(const point& location) const
}
// linear searching
Foam::label Foam::meshSearch::findNearestCellLinear(const point& location) const
{
const vectorField& centres = mesh_.cellCentres();
@ -137,7 +136,6 @@ Foam::label Foam::meshSearch::findNearestCellLinear(const point& location) const
}
// walking from seed
Foam::label Foam::meshSearch::findNearestCellWalk
(
const point& location,
@ -174,7 +172,6 @@ Foam::label Foam::meshSearch::findNearestCellWalk
}
// tree based searching
Foam::label Foam::meshSearch::findNearestFaceTree(const point& location) const
{
// Search nearest cell centre.
@ -214,7 +211,6 @@ Foam::label Foam::meshSearch::findNearestFaceTree(const point& location) const
}
// linear searching
Foam::label Foam::meshSearch::findNearestFaceLinear(const point& location) const
{
const vectorField& centres = mesh_.faceCentres();
@ -234,7 +230,6 @@ Foam::label Foam::meshSearch::findNearestFaceLinear(const point& location) const
}
// walking from seed
Foam::label Foam::meshSearch::findNearestFaceWalk
(
const point& location,
@ -322,7 +317,6 @@ Foam::label Foam::meshSearch::findCellLinear(const point& location) const
}
// walking from seed
Foam::label Foam::meshSearch::findCellWalk
(
const point& location,
@ -514,7 +508,6 @@ Foam::meshSearch::meshSearch
}
// Construct with a custom bounding box
Foam::meshSearch::meshSearch
(
const polyMesh& mesh,
@ -549,8 +542,8 @@ Foam::meshSearch::~meshSearch()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
const Foam::indexedOctree<Foam::treeDataFace>& Foam::meshSearch::boundaryTree()
const
const Foam::indexedOctree<Foam::treeDataFace>&
Foam::meshSearch::boundaryTree() const
{
if (!boundaryTreePtr_.valid())
{
@ -602,8 +595,8 @@ const Foam::indexedOctree<Foam::treeDataFace>& Foam::meshSearch::boundaryTree()
}
const Foam::indexedOctree<Foam::treeDataCell>& Foam::meshSearch::cellTree()
const
const Foam::indexedOctree<Foam::treeDataCell>&
Foam::meshSearch::cellTree() const
{
if (!cellTreePtr_.valid())
{
@ -648,92 +641,6 @@ const
}
//// Is the point in the cell
//// Works by checking if there is a face inbetween the point and the cell
//// centre.
//// Check for internal uses proper face decomposition or just average normal.
//bool Foam::meshSearch::pointInCell(const point& p, label celli) const
//{
// if (faceDecomp_)
// {
// const point& ctr = mesh_.cellCentres()[celli];
//
// vector dir(p - ctr);
// scalar magDir = mag(dir);
//
// // Check if any faces are hit by ray from cell centre to p.
// // If none -> p is in cell.
// const labelList& cFaces = mesh_.cells()[celli];
//
// // Make sure half_ray does not pick up any faces on the wrong
// // side of the ray.
// scalar oldTol = intersection::setPlanarTol(0.0);
//
// forAll(cFaces, i)
// {
// label facei = cFaces[i];
//
// pointHit inter = mesh_.faces()[facei].ray
// (
// ctr,
// dir,
// mesh_.points(),
// intersection::HALF_RAY,
// intersection::VECTOR
// );
//
// if (inter.hit())
// {
// scalar dist = inter.distance();
//
// if (dist < magDir)
// {
// // Valid hit. Hit face so point is not in cell.
// intersection::setPlanarTol(oldTol);
//
// return false;
// }
// }
// }
//
// intersection::setPlanarTol(oldTol);
//
// // No face inbetween point and cell centre so point is inside.
// return true;
// }
// else
// {
// const labelList& f = mesh_.cells()[celli];
// const labelList& owner = mesh_.faceOwner();
// const vectorField& cf = mesh_.faceCentres();
// const vectorField& Sf = mesh_.faceAreas();
//
// forAll(f, facei)
// {
// label nFace = f[facei];
// vector proj = p - cf[nFace];
// vector normal = Sf[nFace];
// if (owner[nFace] == celli)
// {
// if ((normal & proj) > 0)
// {
// return false;
// }
// }
// else
// {
// if ((normal & proj) < 0)
// {
// return false;
// }
// }
// }
//
// return true;
// }
//}
Foam::label Foam::meshSearch::findNearestCell
(
const point& location,
@ -949,7 +856,6 @@ bool Foam::meshSearch::isInside(const point& p) const
}
// Delete all storage
void Foam::meshSearch::clearOut()
{
boundaryTreePtr_.clear();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -325,7 +325,6 @@ bool Foam::regionCoupledBase::order
rotation.setSize(pp.size());
rotation = 0;
// do nothing
return false;
}