From 5b0d85c3ff642ee5db5f0e01adb0a8a5b676fb35 Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 21 Jan 2013 11:43:49 +0000 Subject: [PATCH] ENH: PatchTools: test app --- applications/test/PatchTools/Make/files | 3 + applications/test/PatchTools/Make/options | 7 + .../test/PatchTools/Test-PatchTools.C | 297 ++++++++++++++++++ 3 files changed, 307 insertions(+) create mode 100644 applications/test/PatchTools/Make/files create mode 100644 applications/test/PatchTools/Make/options create mode 100644 applications/test/PatchTools/Test-PatchTools.C diff --git a/applications/test/PatchTools/Make/files b/applications/test/PatchTools/Make/files new file mode 100644 index 0000000000..d148320dc5 --- /dev/null +++ b/applications/test/PatchTools/Make/files @@ -0,0 +1,3 @@ +Test-PatchTools.C + +EXE = $(FOAM_USER_APPBIN)/Test-PatchTools diff --git a/applications/test/PatchTools/Make/options b/applications/test/PatchTools/Make/options new file mode 100644 index 0000000000..3d00e249a6 --- /dev/null +++ b/applications/test/PatchTools/Make/options @@ -0,0 +1,7 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/surfMesh/lnInclude + +EXE_LIBS = \ + -lfiniteVolume diff --git a/applications/test/PatchTools/Test-PatchTools.C b/applications/test/PatchTools/Test-PatchTools.C new file mode 100644 index 0000000000..4cf3eb0a0b --- /dev/null +++ b/applications/test/PatchTools/Test-PatchTools.C @@ -0,0 +1,297 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2012-2013 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 . + +Application + testPatchTools + +Description + Test app for PatchTools functionality + +\*---------------------------------------------------------------------------*/ + +#include "PatchTools.H" +#include "argList.H" +#include "fvMesh.H" +#include "volFields.H" +#include "Time.H" +#include "OBJstream.H" + +using namespace Foam; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +//template +//Foam::tmp +//areaPointNormals +//( +// const polyMesh& mesh, +// const PatchType& p, +// const labelList& meshFaces +//) +//{ +// // Assume patch is smaller than the globalData().coupledPatch() (?) so +// // loop over patch meshPoints. +// +// const labelList& meshPoints = p.meshPoints(); +// +// const globalMeshData& globalData = mesh.globalData(); +// const indirectPrimitivePatch& coupledPatch = globalData.coupledPatch(); +// const Map