In pointPatchField, how to read coordinate values of mesh
Hello foamers:
I want to write a new boundary based on oscillatingDisplacementPointPatchField. I want to give this boundary different values based on the mesh's coordinate values. Not a single value of the patch's coordinate, I mean different values on different girds. In this field, I can't use mesh.C() because "mesh" is not defined. Do you have any idea? Thank you! |
This may work
Code:
const polyMesh& mesh = this->dimensionedInternalField().mesh()(); |
Quote:
But I think polyMesh only contains patch/face information, you can't get mesh coordinates from this. |
I'm a little confused. Are you trying to, from a boundary condition, access the point positions of boundary mesh?
|
Quote:
Do you have any ideas? Thank you! |
Try this from within updateCoeffs()
[CODE] const pointPatch& ptPatch = this->patch(); pointField myPoints = ptPatch.localPoints(); [/CODE I hope that helps! We actually have a pretty thorough discussion of this type of boundary condition in The OpenFOAM Technology Primer: http://www.sourceflux.de/book/ I urge you to consider picking up a copy! Cheers, Kyle |
All times are GMT -4. The time now is 05:50. |