fMc=f1ts.getFieldAtLevel(ON_CELLS,0)
arr=fMc.getArray()
arr.getMinMaxPerComponent() # just to see the variation range of the field per component
- ids=arr.getIdsInRange(0.,1.)
+ ids=arr.findIdsInRange(0.,1.)
f2Mc=fMc[ids]
Using the field "PRESSION_ELEM_DOM" find the 3D pression field applied on the agitator.
agitateurMesh3DMc=pressOnAgitateurMc.getMesh()
m3DSurf,desc,descI,revDesc,revDescI=agitateurMesh3DMc.buildDescendingConnectivity()
nbOf3DCellSharing=revDescI.deltaShiftIndex()
- ids2=nbOf3DCellSharing.getIdsEqual(1)
+ ids2=nbOf3DCellSharing.findIdsEqual(1)
agitateurSkinMc=m3DSurf[ids2]
OffsetsOfTupleIdsInField=revDescI[ids2]
tupleIdsInField=revDesc[OffsetsOfTupleIdsInField]
singlePolyhedron=agitateurMesh3DMc.buildSpreadZonesWithPoly()
singlePolyhedron.orientCorrectlyPolyhedrons()
- centerOfMass=singlePolyhedron.getBarycenterAndOwner()
+ centerOfMass=singlePolyhedron.computeCellCenterOfMass()
.. note:: The call to MEDCouplingUMesh.orientCorrectlyPolyhedrons() is not mandatory
but is recommended: if the polyhedron happens to be mis-oriented, its center of mass will
To this end compute "posSkin", a DataArrayDouble giving for each skin cell the vector
centerOfMass -> G, where G represents the center of mass of the current cell. ::
- barySkin=agitateurSkinMc.getBarycenterAndOwner()
+ barySkin=agitateurSkinMc.computeCellCenterOfMass()
posSkin=barySkin-centerOfMass
Compute the cross product for each cell of "posSkin" using "forceVectSkin"