/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- 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; } const Foam::Enum < Foam::coupledPolyPatch::transformType > Foam::coupledPolyPatch::transformTypeNames ({ { transformType::UNKNOWN, "unknown" }, { transformType::ROTATIONAL, "rotational" }, { transformType::TRANSLATIONAL, "translational" }, { transformType::COINCIDENTFULLMATCH, "coincidentFullMatch" }, { transformType::NOORDERING, "noOrdering" }, }); // * * * * * * * * * * * * 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 ) { for (const label pointi : pointLabels) { writeOBJ(os, points[pointi]); } } 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