anchor.diff:     subroutine CreateOutputMeshes_Test5Orient
      
         real(reki) :: z
  -      real(reki) :: DCM(3,3)
  +      real(Dbki) :: DCM(3,3)
         
         
         Mesh1Type = ELEMENT_LINE2
  
positive.code:       ! ..............................................................................................................................   
        ! Write results to file(s)
        ! ..............................................................................................................................   
     
        un_out = -1
        CALL MeshWrBin ( un_out, Mesh1_I,         ErrStat, ErrMsg, BinOutputName);  IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg))
        CALL MeshWrBin ( un_out, Mesh1_O,         ErrStat, ErrMsg, BinOutputName);  IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg))
        CALL MeshWrBin ( un_out, Mesh2_I,         ErrStat, ErrMsg, BinOutputName);  IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg))
        CALL MeshWrBin ( un_out, Mesh2_O,         ErrStat, ErrMsg, BinOutputName);  IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg))
        CALL MeshWrBin ( un_out, mesh1_I_1PT,     ErrStat, ErrMsg, BinOutputName);  IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg))
        CALL MeshWrBin ( un_out, mesh2_O_1PT,     ErrStat, ErrMsg, BinOutputName);  IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg))   
        CALL MeshWrBin ( un_out, mesh_Motion_1PT, ErrStat, ErrMsg, BinOutputName);  IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg))   
        CALL MeshMapWrBin( un_out, Mesh1_O, Mesh2_I, Map_Mod1_Mod2, ErrStat, ErrMsg, BinOutputName );  IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg)) 
        CALL MeshMapWrBin( un_out, Mesh2_O, Mesh1_I, Map_Mod2_Mod1, ErrStat, ErrMsg, BinOutputName );  IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg)) 
        !close( un_out )
    
        ! ..............................................................................................................................   
        ! map the loads from the transfer to a single point to verify the two modules have the same total loads:
        ! ..............................................................................................................................   
        IF ( Mesh1Type == ELEMENT_POINT ) THEN
           CALL Transfer_Point_to_Point( Mesh1_I, Mesh1_I_1PT, Map_Mod1_I_1PT,ErrStat,ErrMsg,mesh1_O,mesh_Motion_1PT);  IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg))         
        ELSEIF ( Mesh1Type == ELEMENT_LINE2 ) THEN
           CALL Transfer_Line2_to_Point( Mesh1_I, Mesh1_I_1PT, Map_Mod1_I_1PT,ErrStat,ErrMsg,mesh1_O,mesh_Motion_1PT);  IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg))          
        END IF
        
        IF ( Mesh2Type == ELEMENT_POINT ) THEN
           CALL Transfer_Point_to_Point( Mesh2_O, Mesh2_O_1PT, Map_Mod2_O_1PT,ErrStat,ErrMsg,mesh2_I,mesh_Motion_1PT);  IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg)) 
        ELSEIF ( Mesh2Type == ELEMENT_LINE2 ) THEN 
           CALL Transfer_Line2_to_Point( Mesh2_O, Mesh2_O_1PT, Map_Mod2_O_1PT,ErrStat,ErrMsg,mesh2_I,mesh_Motion_1PT);  IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg))          
        END IF
                    
        
        CALL MeshMapWrBin( un_out, Mesh1_I, Mesh1_I_1PT, Map_Mod1_I_1PT, ErrStat, ErrMsg, BinOutputName );  IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg)) 
        CALL MeshMapWrBin( un_out, Mesh2_O, Mesh2_O_1PT, Map_Mod2_O_1PT, ErrStat, ErrMsg, BinOutputName );  IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg)) 
        
        ! ..............................................................................................................................   
        ! Write some info to the screen
        ! ..............................................................................................................................   
     !PRINT *, 'mesh1_I_1PT:'
     !call meshprintinfo(CU,mesh1_I_1PT,mesh1_I_1PT%NNodes)    
     !PRINT *, 'mesh2_O_1PT:'
     !call meshprintinfo(CU,mesh2_O_1PT,mesh2_O_1PT%NNodes)    
     
     
     PrintWarnF=""
     PrintWarnM=""
     do i=1,3
        if (.NOT. equalrealnos(mesh1_I_1PT%Force( i,1),mesh2_O_1PT%Force( i,1)) ) PrintWarnF=NewLine//"  <----------- WARNING: Forces are not equal ----------->  "//NewLine//NewLine
        if (.NOT. equalrealnos(mesh1_I_1PT%Moment(i,1),mesh2_O_1PT%Moment(i,1)) ) PrintWarnM=NewLine//"  <----------- WARNING: Moments are not equal ----------->  "//NewLine//NewLine
     end do
     
        call wrscr(TRIM(PrintWarnF)//'Total Force:' )
        print *, '     Mesh 1:',mesh1_I_1PT%Force 
        print *, '     Mesh 2:',mesh2_O_1PT%Force 
        call wrscr(TRIM(PrintWarnM)//'Total Moment:' )
        print *, '     Mesh 1:',mesh1_I_1PT%Moment 
        print *, '     Mesh 2:',mesh2_O_1PT%Moment      
       
        
  if (TestNumber == 13) then
  
     !write( 17, '(A)' )
     DO i=1,mesh2_o%nnodes
        n1 = mesh1_o%ElemTable(ELEMENT_LINE2)%Elements(Map_Mod1_Mod2%MapMotions(i)%OtherMesh_Element)%ElemNodes(1)
        n2 = mesh1_o%ElemTable(ELEMENT_LINE2)%Elements(Map_Mod1_Mod2%MapMotions(i)%OtherMesh_Element)%ElemNodes(2)
        
        WRITE (17, '(6(F15.5))' ) atan2( mesh2_i%refOrientation(1,2,i ) , mesh2_i%refOrientation(1,1,i ) ),&
                                  atan2( mesh2_i%Orientation(   1,2,i ) , mesh2_i%Orientation(   1,1,i ) ),&
                                  atan2( mesh1_o%refOrientation(1,2,n1) , mesh1_o%refOrientation(1,1,n1) ),&
                                  atan2( mesh1_o%Orientation(   1,2,n1) , mesh1_o%Orientation(   1,1,n1) ),&      
                                  atan2( mesh1_o%refOrientation(1,2,n2) , mesh1_o%refOrientation(1,1,n2) ),&
                                  atan2( mesh1_o%Orientation(   1,2,n2) , mesh1_o%Orientation(   1,1,n2) )
     end do                              
     
  
  
  end if
       
  #ifdef MESH_DEBUG  
     
     
        !call MeshPrintInfo(10*(1+TestNumber)+1,Mesh1_I) 
        !call MeshPrintInfo(10*(1+TestNumber)+1,mesh1_O) 
        !call MeshPrintInfo(10*(1+TestNumber)+3,mesh1_I_1PT) 
        !call MeshPrintInfo(10*(1+TestNumber)+3,mesh_Motion_1PT) 
        !
        !call MeshPrintInfo(10*(1+TestNumber)+2,Mesh2_O) 
        !call MeshPrintInfo(10*(1+TestNumber)+2,mesh2_I) 
        !call MeshPrintInfo(10*(1+TestNumber)+4,mesh2_O_1PT) 
        !call MeshPrintInfo(10*(1+TestNumber)+4,mesh_Motion_1PT) 
  
  if (LEN_TRIM(PrintWarnM)>0 .OR. LEN_TRIM(PrintWarnF)>0 ) THEN
        call wrscr(NewLine)
        call wrmatrix( mesh1_O%TranslationDisp, CU, 'f10.5')
        call wrscr(NewLine)
       ! call wrmatrix( mesh2_I%TranslationDisp, CU, 'f10.5')
       ! call wrmatrix( mesh_Motion_1PT%TranslationDisp, CU, 'f10.5')
       ! call wrmatrix( mesh_Motion_1PT%Position, CU, 'f10.5')
  
  
     if (Map_Mod2_Mod1%Augmented_Ln2_Src%committed) THEN
        CALL MeshCopy( Mesh2_O_1PT, mesh2_O_1PT_augmented, MESH_NEWCOPY, ErrStat, ErrMsg );       IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg))
        mesh2_O_1PT_augmented%force = 0.0
        mesh2_O_1PT_augmented%moment = 0.0
       ! Map_Mod2_Mod1%Augmented_Ln2_Src%TranslationDisp=0.0
        CALL MeshMapCreate( Map_Mod2_Mod1%Augmented_Ln2_Src,  mesh2_O_1PT_augmented, Map_Mod2_O_1PT_augmented, ErrStat, ErrMsg );       IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg))
        CALL Transfer_Line2_to_Point(Map_Mod2_Mod1%Augmented_Ln2_Src,  mesh2_O_1PT_augmented, Map_Mod2_O_1PT_augmented, ErrStat, ErrMsg, Map_Mod2_Mod1%Augmented_Ln2_Src, mesh_Motion_1PT );       IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg))
  
        !print *, '---------Augmented_Ln2_Src:---------------'
        !call meshprintinfo(CU,Map_Mod2_Mod1%Augmented_Ln2_Src)
     end if
        
     if (Map_Mod2_Mod1%Lumped_Points_Src%committed) THEN
        CALL MeshCopy( Mesh2_O_1PT, mesh2_O_1PT_lumped,    MESH_NEWCOPY, ErrStat, ErrMsg );       IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg))
        mesh2_O_1PT_lumped%force = 0.0
        mesh2_O_1PT_lumped%moment = 0.0
       ! Map_Mod2_Mod1%Lumped_Points_Src%TranslationDisp=0.0
        CALL MeshMapCreate( Map_Mod2_Mod1%Lumped_Points_Src,  mesh2_O_1PT_lumped,    Map_Mod2_O_1PT_lumped,    ErrStat, ErrMsg );       IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg))
        CALL Transfer_Point_to_Point(Map_Mod2_Mod1%Lumped_Points_Src,  mesh2_O_1PT_lumped,    Map_Mod2_O_1PT_lumped,    ErrStat, ErrMsg, Map_Mod2_Mod1%Lumped_Points_Src, mesh_Motion_1PT );       IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg))            
  
        !print *, '-------------Lumped_Points_Src:----------------'
        !call meshprintinfo(CU,Map_Mod2_Mod1%Lumped_Points_Src)   
     end if
  
     if (Map_Mod2_Mod1%Lumped_Points_Dest%committed) THEN
        CALL MeshCopy( Mesh1_I_1PT, mesh1_I_1PT_lumped,    MESH_NEWCOPY, ErrStat, ErrMsg );       IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg))
        mesh1_I_1PT_lumped%force = 0.0
        mesh1_I_1PT_lumped%moment = 0.0      
        CALL MeshMapCreate( Map_Mod2_Mod1%Lumped_Points_Dest, mesh1_I_1PT_lumped,    Map_Mod1_I_1PT_lumped,    ErrStat, ErrMsg );       IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg))      
        CALL Transfer_Point_to_Point(Map_Mod2_Mod1%Lumped_Points_Dest, mesh1_I_1PT_lumped,    Map_Mod1_I_1PT_lumped,    ErrStat, ErrMsg, mesh1_O, mesh_Motion_1PT );       IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg))     
  
        !print *, '-----------Lumped_Points_Dest:---------------'
        !call meshprintinfo(CU,Map_Mod2_Mod1%Lumped_Points_Dest)   
     end if
           
              
        call wrscr('Total Force:' )                                                                                                                            
                                             print *, '     Mesh 2:            ',mesh2_O_1PT%Force ,          trim(num2lstr(mesh2_O%Nnodes                          ))
        if (mesh2_O_1PT_augmented%committed) print *, '     Mesh 2 (augmented):',mesh2_O_1PT_augmented%Force, trim(num2lstr(Map_Mod2_Mod1%Augmented_Ln2_Src%Nnodes  ))
        if (mesh2_O_1PT_lumped%committed)    print *, '     Mesh 2 (lumped):   ',mesh2_O_1PT_lumped%Force ,   trim(num2lstr(Map_Mod2_Mod1%Lumped_Points_Src%Nnodes  ))
        if (mesh1_I_1PT_lumped%committed)    print *, '     Mesh 1 (lumped):   ',mesh1_I_1PT_lumped%Force ,   trim(num2lstr(Map_Mod2_Mod1%Lumped_Points_Dest%Nnodes ))
                                             print *, '     Mesh 1:            ',mesh1_I_1PT%Force ,          trim(num2lstr(mesh1_I%Nnodes                          ))
        call wrscr('Total Moment:' )
                                             print *, '     Mesh 2:            ',mesh2_O_1PT%Moment ,          trim(num2lstr(mesh2_O%Nnodes                          ))
        if (mesh2_O_1PT_augmented%committed) print *, '     Mesh 2 (augmented):',mesh2_O_1PT_augmented%Moment, trim(num2lstr(Map_Mod2_Mod1%Augmented_Ln2_Src%Nnodes  ))
        if (mesh2_O_1PT_lumped%committed)    print *, '     Mesh 2 (lumped):   ',mesh2_O_1PT_lumped%Moment ,   trim(num2lstr(Map_Mod2_Mod1%Lumped_Points_Src%Nnodes  ))
        if (mesh1_I_1PT_lumped%committed)    print *, '     Mesh 1 (lumped):   ',mesh1_I_1PT_lumped%Moment ,   trim(num2lstr(Map_Mod2_Mod1%Lumped_Points_Dest%Nnodes ))
                                             print *, '     Mesh 1:            ',mesh1_I_1PT%Moment       ,    trim(num2lstr(mesh1_I%Nnodes                          ))
  END IF
  #endif
        
        
                 
        ! ..............................................................................................................................   
        ! Destroy data structures:
        ! ..............................................................................................................................   
  
negative.code:       CALL MeshMapCreate( Mesh1_O, Mesh2_I,     Map_Mod1_Mod2, ErrStat, ErrMsg );       IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg))   
        CALL MeshMapCreate( Mesh2_O, Mesh1_I,     Map_Mod2_Mod1, ErrStat, ErrMsg );       IF (ErrStat /= ErrID_None) CALL WrScr(TRIM(ErrMsg))
        
        ! ..............................................................................................................................   
        ! Map the outputs to inputs:
        ! ..............................................................................................................................   
        IF (Mesh1Type == ELEMENT_POINT ) THEN
           IF ( Mesh2Type == ELEMENT_POINT ) THEN            
              CALL Transfer_Point_to_Point( Mesh1_O, Mesh2_I, Map_Mod1_Mod2, ErrStat, ErrMsg );                     IF (ErrStat /= ErrID_None) CALL WrScr("*******"//TRIM(ErrMsg))     
              CALL Transfer_Point_to_Point( Mesh2_O, Mesh1_I, Map_Mod2_Mod1, ErrStat, ErrMsg, Mesh2_I, Mesh1_O );   IF (ErrStat /= ErrID_None) CALL WrScr("*******"//TRIM(ErrMsg))               
           ELSEIF ( Mesh2Type == ELEMENT_LINE2) THEN                                                                
              CALL Transfer_Point_to_Line2( Mesh1_O, Mesh2_I, Map_Mod1_Mod2, ErrStat, ErrMsg );                     IF (ErrStat /= ErrID_None) CALL WrScr("*******"//TRIM(ErrMsg))     
              CALL Transfer_Line2_to_Point( Mesh2_O, Mesh1_I, Map_Mod2_Mod1, ErrStat, ErrMsg, Mesh2_I, Mesh1_O );   IF (ErrStat /= ErrID_None) CALL WrScr("*******"//TRIM(ErrMsg))         
  