Skip to content
Snippets Groups Projects
Commit 13b90eb6 authored by mattijs's avatar mattijs
Browse files

ENH: labelledTri: specialisation for offsetOp

parent f42be0fb
Branches
Tags
No related merge requests found
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -114,6 +114,29 @@ public:
template<>
inline bool contiguous<labelledTri>() {return true;}
//- Used to offset faces in ListListOps::combineOffset
template<>
class offsetOp<labelledTri>
{
public:
labelledTri operator()
(
const labelledTri& x,
const label offset
) const
{
labelledTri result(x);
forAll(x, xI)
{
result[xI] = x[xI] + offset;
}
return result;
}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
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