/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see .
\*---------------------------------------------------------------------------*/
#include "pointConstraints.H"
#include "emptyPointPatch.H"
#include "polyMesh.H"
#include "pointMesh.H"
#include "globalMeshData.H"
#include "twoDPointCorrector.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(pointConstraints, 0);
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::pointConstraints::makePatchPatchAddressing()
{
if (debug)
{
Pout<< "pointConstraints::makePatchPatchAddressing() : "
<< "constructing boundary addressing"
<< endl << incrIndent;
}
const pointMesh& pMesh = mesh();
const polyMesh& mesh = pMesh();
const pointBoundaryMesh& pbm = pMesh.boundary();
const polyBoundaryMesh& bm = mesh.boundaryMesh();
// first count the total number of patch-patch points
label nPatchPatchPoints = 0;
forAll(pbm, patchi)
{
if (!isA(pbm[patchi]) && !pbm[patchi].coupled())
{
const labelList& bp = bm[patchi].boundaryPoints();
nPatchPatchPoints += bp.size();
if (debug)
{
Pout<< indent << "On patch:" << pbm[patchi].name()
<< " nBoundaryPoints:" << bp.size() << endl;
}
}
}
if (debug)
{
Pout<< indent << "Found nPatchPatchPoints:" << nPatchPatchPoints
<< endl;
}
// Go through all patches and mark up the external edge points
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// From meshpoint to index in patchPatchPointConstraints_.
Map