anchor.diff:                                          ElemCrackingClassOverlapping(1+j),edgeNodeNew1,edgeNodeNew2)
                   !-- check that the elem are vaild wrt the connectivity
                   bElemValidMain(1+j)= ElemCrackingClassMain(1+j)%EC_CheckElemValid ()
  +                if(bElemValidMain(1+j) ==1) ElemIdsNewMain(1+j)=ElemId2
  +
                   bElemValidOverlapping(1+j)= ElemCrackingClassOverlapping(1+j)%EC_CheckElemValid ()
  +                if(bElemValidOverlapping(1+j) ==1) ElemIdsNewOverlapping(1+j)=EC_ElemCountCurrent+1+j
               endif
           enddo
           !- loop over all the temp elems and nodes and add them
           bEdgeCracked=0
           do j=1,4    !--each edge can be shared between more than one elem
  -            if(bElemValidMain(j) ==1) then 
  +            if(bElemValidMain(j) ==1) then
                   bEdgeCracked=1
  -
  +                ElemConnect(1:4,ElemIdsNewMain(j))=ElemCrackingClassMain(j)%iElemConnectivity(1:4)
  +                CALL EC_CopyElemsData(ElemIdsNewMain(j),ElemIdsNewMain(j),ElemCrackingClassMain(j),ElemCrackingClassMain(j), &
  +                                    ElemMaterial, freep,ym )
  +            !    !-- update edges neighbors
  +            !    nodeIdLocal=EC_ElemEdgesConnect(2,ElemEdgeId)
  +            !    edge1=EC_ElemNodesEdges(1,nodeIdLocal)
  +            !    edge2=EC_ElemNodesEdges(2,nodeIdLocal)
  +            !    ElemCrackingClassMain(j)%iElemEdgeNeighbors(:,edge1)=0
  +            !    ElemCrackingClassMain(j)%iElemEdgeNeighbors(:,edge2)=0
  +            !    !-- add the new overlapping elem as neighbor to this elem at the opposite edge
  +            !    !-- this is the opposite edge to the cracked edge.
  +            !    mMyEdgeId=EC_ElemEdgesOpposite(ElemEdgeId)
  +            !    mElemOther=EC_ElemCountCurrent+1
  +            !    mEdgeOther=mMyEdgeId
  +            !    call ElemCrackingClassMain(j)%EC_ElemAddToNeighbors (mMyEdgeId,mElemOther,mEdgeOther)
  +            endif
  +            if(bElemValidOverlapping(j) ==1) then
  +                ElemConnect(1:4,ElemIdsNewOverlapping(j))=ElemCrackingClassOverlapping(j)%iElemConnectivity(1:4)
  +                CALL EC_CopyElemsData(ElemIdsNewMain(j),ElemIdsNewOverlapping(j),ElemCrackingClassMain(j), &
  +                                        ElemCrackingClassOverlapping(j),ElemMaterial, freep,ym )
  +            !    !-- update edges neighbors
  +            !    nodeIdLocal=EC_ElemEdgesConnect(1,ElemEdgeId)
  +            !    edge1=EC_ElemNodesEdges(1,nodeIdLocal)
  +            !    edge2=EC_ElemNodesEdges(2,nodeIdLocal)
  +            !    ElemCrackingClassOverlapping(j)%iElemEdgeNeighbors(:,edge1)=0
  +            !    ElemCrackingClassOverlapping(j)%iElemEdgeNeighbors(:,edge2)=0
  +            !    !-- add the main elem as neighbor to new overlapping elem at the opposite edge
  +            !    !-- this is the opposite edge to the cracked edge.
  +            !    mElemOther=ElemId
  +            !    call ElemCrackingClassOverlapping(j)%EC_ElemAddToNeighbors (mMyEdgeId,mElemOther,mEdgeOther)
  +            !    !-- copy edge neighbors to the new edges
  +            !    EC_ElemCountCurrent=EC_ElemCountCurrent+1
               endif
           enddo
           if(bEdgeCracked ==1) then
  
positive.code: 
          bElemValidMain=0
          bElemValidOverlapping=0
          !-- crack the edge of the current elem,create 2 nodes, add 1 elem
          call EC_CreateElemsTemp(ElemId,ElemEdgeId,ElemConnect,ElemCrackingClassMain(1),ElemCrackingClassOverlapping(1), &
                                  edgeNodeNew1,edgeNodeNew2)
  
          !-- check that the elem are vaild wrt the connectivity
          bElemValidMain(1)= ElemCrackingClassMain(1)%EC_CheckElemValid ()
          bElemValidOverlapping(1)= ElemCrackingClassOverlapping(1)%EC_CheckElemValid ()
  
          !-- find the edge neighbors and crack their edges
          call pEC_ElemData(ElemId)%EC_GetElemEdgeNeighbors (ElemEdgeId,mElemEdgeNeighborsList)
  
negative.code:         INTEGER mElemEdgeNeighborsList(6)
          ! integer EdgeNode1,EdgeNode2,EdgeNode1N(4),EdgeNode2N(4),j
          type ( EC_ElemCrackingClass ) :: ElemCrackingClassMain(4),ElemCrackingClassOverlapping(4)
          INTEGER bElemValidMain(4),bElemValidOverlapping(4),ElemIdsNewMain(4),ElemIdsNewOverlapping(4)
          INTEGER edgeNodeOld1,edgeNodeOld2,edgeNodeNew1,edgeNodeNew2
          INTEGER bEdgeCracked !-- 0=not cracked, 1= cracked with elems added
          INTEGER nodeIdLocal,edge1,edge2,mMyEdgeId,mElemOther,mEdgeOther
  
          !- get new and old edge nodes
          edgeNodeOld1=ElemConnect(EC_ElemEdgesConnect(1,ElemEdgeId),ElemId)
  