ENH: mapFields: add -subtract option to subtract whilst mapping

This commit is contained in:
mattijs
2011-12-22 11:39:54 +00:00
parent 7e95308c6b
commit 0f2e8be91c
6 changed files with 476 additions and 203 deletions

View File

@ -35,12 +35,13 @@ License
namespace Foam
{
template<class Type>
template<class Type, class CombineOp>
void MapConsistentVolFields
(
const IOobjectList& objects,
const meshToMesh& meshToMeshInterp,
const meshToMesh::order& mapOrder
const meshToMesh::order& mapOrder,
const CombineOp& cop
)
{
const fvMesh& meshSource = meshToMeshInterp.fromMesh();
@ -84,7 +85,13 @@ void MapConsistentVolFields
);
// Interpolate field
meshToMeshInterp.interpolate(fieldTarget, fieldSource, mapOrder);
meshToMeshInterp.interpolate//<Type, eqOp<Type> >
(
fieldTarget,
fieldSource,
mapOrder,
cop
);
// Write field
fieldTarget.write();
@ -97,7 +104,12 @@ void MapConsistentVolFields
GeometricField<Type, fvPatchField, volMesh> fieldTarget
(
fieldTargetIOobject,
meshToMeshInterp.interpolate(fieldSource, mapOrder)
meshToMeshInterp.interpolate//<Type, eqOp<Type> >
(
fieldSource,
mapOrder,
cop
)
);
// Write field