triangle storage: Return barycentric coordinates as FixedList instead of List

Patch contributed by Mattijs Janssens
Resolves bug-report http://bugs.openfoam.org/view.php?id=2278
This commit is contained in:
Henry Weller
2016-09-30 16:22:55 +01:00
parent deecbf9e06
commit ff28c48477
16 changed files with 37 additions and 43 deletions

View File

@ -97,7 +97,7 @@ Foam::scalarField Foam::cellShapeControl::cellSize
Foam::scalar Foam::cellShapeControl::cellSize(const point& pt) const
{
scalarList bary;
FixedList<scalar, 4> bary;
cellShapeControlMesh::Cell_handle ch;
shapeControlMesh_.barycentricCoords(pt, bary, ch);
@ -172,7 +172,7 @@ Foam::scalar Foam::cellShapeControl::cellSize(const point& pt) const
Foam::tensor Foam::cellShapeControl::cellAlignment(const point& pt) const
{
scalarList bary;
FixedList<scalar, 4> bary;
cellShapeControlMesh::Cell_handle ch;
shapeControlMesh_.barycentricCoords(pt, bary, ch);
@ -244,7 +244,7 @@ void Foam::cellShapeControl::cellSizeAndAlignment
tensor& alignment
) const
{
scalarList bary;
FixedList<scalar, 4> bary;
cellShapeControlMesh::Cell_handle ch;
shapeControlMesh_.barycentricCoords(pt, bary, ch);

View File

@ -452,7 +452,7 @@ Foam::cellShapeControlMesh::~cellShapeControlMesh()
void Foam::cellShapeControlMesh::barycentricCoords
(
const Foam::point& pt,
scalarList& bary,
FixedList<scalar, 4>& bary,
Cell_handle& ch
) const
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -122,7 +122,7 @@ public:
void barycentricCoords
(
const Foam::point& pt,
scalarList& bary,
FixedList<scalar, 4>& bary,
Cell_handle& ch
) const;

View File

@ -94,7 +94,7 @@ Foam::fileControl::~fileControl()
//
//Foam::scalar Foam::fileControl::cellSize(const point& pt) const
//{
// scalarList bary;
// FixedList<scalar, 4> bary;
// Cell_handle ch;
//
// triangulatedMesh_.barycentricCoords(pt, bary, ch);
@ -112,7 +112,7 @@ Foam::fileControl::~fileControl()
////- Return the cell alignment at the given location
//Foam::tensor Foam::fileControl::cellAlignment(const point& pt) const
//{
// scalarList bary;
// FixedList<scalar, 4> bary;
// Cell_handle ch;
//
// triangulatedMesh_.barycentricCoords(pt, bary, ch);
@ -144,7 +144,7 @@ Foam::fileControl::~fileControl()
// tensor& alignment
//) const
//{
// scalarList bary;
// FixedList<scalar, 4> bary;
// Cell_handle ch;
//
// triangulatedMesh_.barycentricCoords(pt, bary, ch);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -118,8 +118,7 @@ Foam::scalar Foam::nonUniformField::interpolate
pts[faceHitByPt[2]]
);
scalarList bary(3, 0.0);
FixedList<scalar, 3> bary;
tri.barycentric(pt, bary);
// return pointCellSize_[pMap[faceHitByPt[0]]]*bary[0]