if(pmptpd->getType()!=ON_NODES)
return;// Only node-fields need care
MEDFileAnyTypeField1TSWithoutSDA *ct(_cur_f1ts->contentNotNullBase());
- MEDFileFieldPerMeshPerTypePerDisc *pmtd(ct->getLeafGivenMeshAndTypeAndLocId(_lin->getName(),_gt,pmptpd->getLocId()));
+ MEDFileFieldPerMeshPerTypePerDisc *pmtdToModify(ct->getLeafGivenMeshAndTypeAndLocId(_lin->getName(),_gt,pmptpd->getLocId()));
+ std::string pflName(pmptpd->getProfile());
+ MCAuto<DataArrayInt> pfl;
+ if(pflName.empty())
+ pfl=DataArrayInt::Range(0,pmptpd->getNumberOfVals(),1);
+ else
+ pfl=_lin_globs->getProfile(pflName)->deepCopy();
+ {
+ 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());
+ MCAuto<DataArrayInt> orphansNodes;
+ {
+ MCAuto<MEDCouplingUMesh> tmp1(mesh3D->buildPartOfMySelf(cellIds->begin(),cellIds->end(),true));
+ MCAuto<DataArrayInt> tmp2(tmp1->computeFetchedNodeIds());
+ orphansNodes=pfl->buildSubstraction(tmp2);
+ }
+ mesh3DQuadraticRestrictedNodeIds->checkMonotonic(true);
+ MCAuto<DataArrayInt> newPtsIds(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);
+ }
+ }
+
}
void MEDFileFieldLin2QuadVisitor::newPerMeshPerTypeEntry(const MEDFileFieldPerMeshPerTypeCommon *pmpt)