/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2020 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 "coupledPolyPatch.H"
#include "ListOps.H"
#include "transform.H"
#include "OFstream.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(coupledPolyPatch, 0);
const scalar coupledPolyPatch::defaultMatchTol_ = 1e-4;
template<>
const char* NamedEnum::names[] =
{
"unknown",
"coincidentFullMatch",
"noOrdering"
};
const NamedEnum
coupledPolyPatch::orderingTypeNames;
}
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
void Foam::coupledPolyPatch::writeOBJ(Ostream& os, const point& pt)
{
os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << endl;
}
void Foam::coupledPolyPatch::writeOBJ
(
Ostream& os,
const pointField& points,
const labelList& pointLabels
)
{
forAll(pointLabels, i)
{
writeOBJ(os, points[pointLabels[i]]);
}
}
void Foam::coupledPolyPatch::writeOBJ
(
Ostream& os,
const point& p0,
const point& p1,
label& vertI
)
{
writeOBJ(os, p0);
vertI++;
writeOBJ(os, p1);
vertI++;
os << "l " << vertI-1 << ' ' << vertI << nl;
}
void Foam::coupledPolyPatch::writeOBJ
(
const fileName& fName,
const UList& faces,
const pointField& points
)
{
OFstream os(fName);
Map