CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Can I make a copy of a patch mesh and move it? (https://www.cfd-online.com/Forums/openfoam-programming-development/81008-can-i-make-copy-patch-mesh-move.html)

bigphil October 13, 2010 11:29

Can I make a copy of a patch mesh and move it?
 
Hi,


In my solver I use patchToPatchInterpolation to interpolate a value from one patch to another, but I need the deformed patch mesh to define the patchToPatchInterpolation. Is there some way I can make a copy of a patch mesh and then move it?

At the moment I move the whole mesh, then declare my patchToPatchInterpolation and do any patch interpolation I need, then I move the whole mesh back.
This is obviously not the most efficient way of doing it.

I define the patchToPatchInterpolation like this:
Code:

patchToPatchInterpolation masterToSlaveInterpolate
(
deformedMesh.boundaryMesh()[masterIndex], //from patch
deformedmesh.boundaryMesh()[slaveIndex], //to patch
algorithm,
direction
);


Is there some way I can make a copy of the patch meshes and then move these?

I tried:
Code:

polyPatch masterPatchMesh mesh.boundaryMesh()[masterIndex];
masterPatchMesh.movePoints(pointUonMasterPatch);

but that doesn't work presumably because I haven't actually made a copy of the mesh patch I just have a pointer to it...

Hopefully some one might have an idea to help me,
All suggestions welcome.


Thanks,
Philip


All times are GMT -4. The time now is 14:21.