anchor.diff:      real sigfrac0,sigfrac,decfrac
       real critfrac
   
  -    real NodesCoordx(*), NodesCoordy(*),NodesDispl(*)
  -    real usi(*),freep(5,*), ym(4,*)
  -    INTEGER ElemConnect(4,*),ElemMaterial(*),DofIds(2,*)
  -    INTEGER SolStepCount
  -    integer e1,e2
  -
  -    freep(1:5,e2)=freep(1:5,e1)
  -
  -    Y_modulus(e2)=Y_modulus(e1)
  -    possion_ratio(e2) = possion_ratio(e1)
  -    tau_y(e2) = tau_y(e1)
  -    abc(1:573,e2,1)=abc(1:573,e1,1)
  -    his(1:573,e2,1)=his(1:573,e1,1)
  -
  -    nnn2(e2,1)=nnn2(e1,1)
  -
  -    fhg(e1,1:8)=fhg(e2,1:8)
  -    fhghis(e1,1:8)=fhghis(e2,1:8)
  -
  -    hgsstore(e1)=hgsstore(e2)
  -    hgshis(e1)=hgshis(e2)
  -
  -    totenerstore(e1)=totenerstore(e2)
  -    totenerhis(e1)=totenerhis(e2)
  -    inertener(e1)=inertener(e2)
  -
  -    hgenerstore(e1)=hgenerstore(e2)
  -    hgenerhis(e1)=hgenerhis(e2)
  -
  -    hgstress1store(e1)=hgstress1store(e2)
  -    hgstress2store(e1)=hgstress2store(e2)
  -    hgstress1his(e1)=hgstress1his(e2)
  -    hgstress2his(e1)=hgstress2his(e2)
  -
  -    sigfrac0(e1)=sigfrac0(e2)
  -    sigfrac(e1)=sigfrac(e2)
  -    decfrac(e1)=decfrac(e2)
  -
  -    CALL CNmanager_CopyElemnt(e1,e2)
  -    CALL pEC_ElemData(e1)%CopyElem (pEC_ElemData(e2))
  +    real freep(5,*),ym(4,*)
  +    INTEGER ElemMaterial(*)
  +    integer j
  +
  +    freep(1:5,ElemTo)=freep(1:5,ElemFrom)
  +
  +    ElemMaterial(ElemTo)=ElemMaterial(ElemFrom)
  +    Y_modulus(ElemTo)=Y_modulus(ElemFrom)
  +    possion_ratio(ElemTo) = possion_ratio(ElemFrom)
  +    tau_y(ElemTo) = tau_y(ElemFrom)
  +    abc(1:573,ElemTo,1)=abc(1:573,ElemFrom,1)
  +    his(1:573,ElemTo,1)=his(1:573,ElemFrom,1)
  +
  +    nnn2(ElemTo,1)=nnn2(ElemFrom,1)
  +    !!--- lumped mass matrix
  +    do j=1,4
  +        ym(j,ElemTo)=ym(j,ElemFrom)*ElemCrackingClassMain%EC_GetElemAreaRatio()
  +        ym(j,ElemFrom)=ym(j,ElemFrom)*ElemCrackingClassOverlapping%EC_GetElemAreaRatio()
  +    end do
  +
  +    fhg(ElemTo,1:8)=fhg(ElemFrom,1:8)
  +    fhghis(ElemTo,1:8)=fhghis(ElemFrom,1:8)
  +
  +    hgsstore(ElemTo)=hgsstore(ElemFrom)
  +    hgshis(ElemTo)=hgshis(ElemFrom)
  +
  +    totenerstore(ElemTo)=totenerstore(ElemFrom)
  +    totenerhis(ElemTo)=totenerhis(ElemFrom)
  +    inertener(ElemTo)=inertener(ElemFrom)
  +
  +    hgenerstore(ElemTo)=hgenerstore(ElemFrom)
  +    hgenerhis(ElemTo)=hgenerhis(ElemFrom)
  +
  +    hgstress1store(ElemTo)=hgstress1store(ElemFrom)
  +    hgstress2store(ElemTo)=hgstress2store(ElemFrom)
  +    hgstress1his(ElemTo)=hgstress1his(ElemFrom)
  +    hgstress2his(ElemTo)=hgstress2his(ElemFrom)
  +
  +    sigfrac0(ElemTo)=sigfrac0(ElemFrom)
  +    sigfrac(ElemTo)=sigfrac(ElemFrom)
  +    decfrac(ElemTo)=decfrac(ElemFrom)
  +
  +    CALL CNmanager_CopyElemnt(ElemFrom,ElemTo)
  +    CALL pEC_ElemData(ElemFrom)%CopyElem (pEC_ElemData(ElemTo))
  +
   
       end subroutine EC_CopyElemsData
   !##############################################################################
  
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:             call EC_CopyNodesData(nodesIds(i),nodesIds(i+4),NodesCoordx, NodesCoordy, DofIds, NodesDispl,usi,freep,ym)
          enddo
          !- copy elems data to the new nodes
          ! call EC_CopyElemsData(ElemId,EC_ElemCountCurrent+1,NodesCoordx, NodesCoordy, ElemConnect, DofIds, NodesDispl, &
          !                         ElemMaterial, usi  , freep , ym,SolStepCount)
          ! CALL pEC_ElemData(ElemId)%CopyElem (pEC_ElemData(EC_ElemCountCurrent+1))
  
          !---------------------------1- add Dof
          do j=1,4
  