Skip to content
Snippets Groups Projects
Commit 2b7dee2c authored by Mark Olesen's avatar Mark Olesen
Browse files

add applications/test/BSpline - it fails!

parent adcb7646
No related branches found
No related tags found
No related merge requests found
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ 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 2 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, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "argList.H"
#include "simpleMatrix.H"
#include "vector.H"
#include "IFstream.H"
#include "BSpline.H"
using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Main program:
int main(int argc, char *argv[])
{
argList::noParallel();
argList::validArgs.insert("file .. fileN");
argList args(argc, argv, false, true);
forAll(args.additionalArgs(), argI)
{
const string& srcFile = args.additionalArgs()[argI];
Info<< nl << "reading " << srcFile << nl;
IFstream ifs(srcFile);
List<pointField> splinePointFields(ifs);
forAll(splinePointFields, splineI)
{
Info<<"convert " << splinePointFields[splineI] << " to bspline" << endl;
BSpline spl(splinePointFields[splineI], vector::zero, vector::zero);
Info<< "1/2 = " << spl.position(0.5) << endl;
}
}
return 0;
}
// ************************************************************************* //
BSplineTest.C
EXE = $(FOAM_USER_APPBIN)/BSplineTest
EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/mesh/blockMesh/lnInclude
EXE_LIBS = -lblockMesh
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
(
// Upper body longitudinal splines.
(
(-0.22685 -0.01125166 0) // 7
(-0.21685 -0.01340204 0)
(-0.20685 -0.01529684 0)
(-0.19685 -0.01694748 0)
(-0.18685 -0.01836538 0)
(-0.17685 -0.01956197 0)
(-0.16685 -0.02054868 0)
(-0.15685 -0.02133693 0)
(-0.14685 -0.02193816 0)
(-0.13685 -0.02236377 0)
(-0.12685 -0.02262521 0)
(-0.11685 -0.02273389 0) // 2
)
(
(-0.22685 0 0.01125166) // 8
(-0.21685 0 0.01340204)
(-0.20685 0 0.01529684)
(-0.19685 0 0.01694748)
(-0.18685 0 0.01836538)
(-0.17685 0 0.01956197)
(-0.16685 0 0.02054868)
(-0.15685 0 0.02133693)
(-0.14685 0 0.02193816)
(-0.13685 0 0.02236377)
(-0.12685 0 0.02262521)
(-0.11685 0 0.02273389) // 3
)
(
(-0.22685 0.01125166 0) // 9
(-0.21685 0.01340204 0)
(-0.20685 0.01529684 0)
(-0.19685 0.01694748 0)
(-0.18685 0.01836538 0)
(-0.17685 0.01956197 0)
(-0.16685 0.02054868 0)
(-0.15685 0.02133693 0)
(-0.14685 0.02193816 0)
(-0.13685 0.02236377 0)
(-0.12685 0.02262521 0)
(-0.11685 0.02273389 0) // 4
)
(
(-0.22685 0 -0.01125166) // 6
(-0.21685 0 -0.01340204)
(-0.20685 0 -0.01529684)
(-0.19685 0 -0.01694748)
(-0.18685 0 -0.01836538)
(-0.17685 0 -0.01956197)
(-0.16685 0 -0.02054868)
(-0.15685 0 -0.02133693)
(-0.14685 0 -0.02193816)
(-0.13685 0 -0.02236377)
(-0.12685 0 -0.02262521)
(-0.11685 0 -0.02273389) // 1
)
);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment