Commit 428dff77 authored by mattijs's avatar mattijs
Browse files

ENH: tetDecomposer: continue in case of neg-tet volume

parent f393f8b2
......@@ -2,8 +2,8 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -149,7 +149,7 @@ Foam::label Foam::tetDecomposer::triIndex(const label faceI, const label fp)
const
{
const face& f = mesh_.faces()[faceI];
const label fp0 = mesh_.tetBasePtIs()[faceI];
const label fp0 = max(0, mesh_.tetBasePtIs()[faceI]);
// Work out triangle index on this face
label thisTriI;
......@@ -436,7 +436,7 @@ void Foam::tetDecomposer::setRefinement
}
else
{
label fp0 = mesh_.tetBasePtIs()[faceI];
label fp0 = max(mesh_.tetBasePtIs()[faceI], 0);
label fp = f.fcIndex(fp0);
for (label triI = 0; triI < f.size()-2; triI++)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment