ENH: mapDistribute: add transforms of Lists of Lists

This commit is contained in:
mattijs
2013-10-07 17:35:10 +01:00
parent df7f871d14
commit e1ac4b305f

View File

@ -251,27 +251,35 @@ public:
{
public:
template<class T>
template<class Type>
void operator()
(
const vectorTensorTransform& vt,
const bool forward,
List<T>& fld
List<Type>& fld
) const
{
if (forward)
const tensor T(forward ? vt.R() : vt.R().T());
transformList(T, fld);
}
template<class Type>
void operator()
(
const vectorTensorTransform& vt,
const bool forward,
List<List<Type> >& flds
) const
{
forAll(flds, i)
{
transformList(vt.R(), fld);
}
else
{
transformList(vt.R().T(), fld);
operator()(vt, forward, flds[i]);
}
}
//- Transform patch-based field
template<class T>
void operator()(const coupledPolyPatch& cpp, UList<T>& fld) const
template<class Type>
void operator()(const coupledPolyPatch& cpp, UList<Type>& fld) const
{
if (!cpp.parallel())
{
@ -280,8 +288,8 @@ public:
}
//- Transform sparse field
template<class T, template<class> class Container>
void operator()(const coupledPolyPatch& cpp, Container<T>& map)
template<class Type, template<class> class Container>
void operator()(const coupledPolyPatch& cpp, Container<Type>& map)
const
{
if (!cpp.parallel())
@ -313,6 +321,18 @@ public:
fld = vt.invTransformPosition(pfld);
}
}
void operator()
(
const vectorTensorTransform& vt,
const bool forward,
List<List<point> >& flds
) const
{
forAll(flds, i)
{
operator()(vt, forward, flds[i]);
}
}
//- Transform patch-based field
void operator()(const coupledPolyPatch& cpp, pointField& fld) const
{