mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: labelledTri: specialisation for offsetOp
This commit is contained in:
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
Reference in New Issue
Block a user