- MCAuto<MEDCouplingUMesh> mesh3D(_lin->getMeshAtLevel(0)),mesh3DQuadratic(_quad->getMeshAtLevel(0));
- MCAuto<DataArrayInt> cellIds(mesh3D->getCellIdsLyingOnNodes(pfl->begin(),pfl->end(),true));
- MCAuto<MEDCouplingUMesh> mesh3DQuadraticRestricted(mesh3DQuadratic->buildPartOfMySelf(cellIds->begin(),cellIds->end(),true));
- MCAuto<DataArrayInt> mesh3DQuadraticRestrictedNodeIds(mesh3DQuadraticRestricted->computeFetchedNodeIds());
- mesh3DQuadraticRestrictedNodeIds->checkMonotonic(true);
- _new_pts_ids=mesh3DQuadraticRestrictedNodeIds->buildSubstraction(pfl);
- MCAuto<MEDCoupling1SGTUMesh> allSeg3;
- {
- MCAuto<DataArrayInt> a,b,c,d;
- MCAuto<MEDCouplingUMesh> seg3Tmp(mesh3DQuadraticRestricted->explodeIntoEdges(a,b,c,d));
- allSeg3=MEDCoupling1SGTUMesh::New(seg3Tmp);
- }
- if(allSeg3->getCellModelEnum()!=INTERP_KERNEL::NORM_SEG3)
- throw INTERP_KERNEL::Exception("MEDFileFieldLin2QuadVisitor::newPerMeshPerTypePerDisc : invalid situation where SEG3 expected !");
- MCAuto<DataArrayInt> midPts,cellSeg3Ids;
- {
- DataArrayInt *nodeConn(allSeg3->getNodalConnectivity());
- nodeConn->rearrange(3);
- {
- std::vector<int> v(1,2);
- midPts=nodeConn->keepSelectedComponents(v);
- }
- cellSeg3Ids=DataArrayInt::FindPermutationFromFirstToSecond(midPts,_new_pts_ids);
- {
- std::vector<int> v(2); v[0]=0; v[1]=1;
- MCAuto<DataArrayInt> tmp(nodeConn->keepSelectedComponents(v));
- _matrix=tmp->selectByTupleId(cellSeg3Ids->begin(),cellSeg3Ids->end());
- }
- nodeConn->rearrange(1);
- }
- updateData(pmtdToModify);
+ MCAuto<DataArrayIdType> a,b,c,d;
+ MCAuto<MEDCouplingUMesh> seg3Tmp(mesh3DQuadraticRestricted->explodeIntoEdges(a,b,c,d));
+ allSeg3=MEDCoupling1SGTUMesh::New(seg3Tmp);