anchor.diff:              ! Create the node on the mesh
            CALL MeshPositionNode (u%Mesh, ThisBodyNum, XYZloc, ErrStatTmp, ErrMsgTmp, orientation )
            CALL SetErrStat( ErrStatTmp, ErrMsgTmp, ErrStat, ErrMsg, RoutineName)
  - 
  +
               ! Create the mesh element
            CALL MeshConstructElement (  u%Mesh, ELEMENT_POINT, ErrStatTmp, ErrMsgTmp, ThisBodyNum )
            CALL SetErrStat( ErrStatTmp, ErrMsgTmp, ErrStat, ErrMsg, RoutineName)
         ENDDO
  - 
  +
         CALL MeshCommit ( u%Mesh, ErrStatTmp, ErrMsgTmp )
         CALL SetErrStat( ErrStatTmp, ErrMsgTmp, ErrStat, ErrMsg, RoutineName)
         IF ( ErrStat >= AbortErrLev ) THEN
  
positive.code:          Data4D%WvFreq2( 1 )                 = 0.0_SiKi
           Data4D%WvFreq2( 2 )                 = MAX( TmpWvFreq2(1) - 10.0_SiKi*EPSILON(0.0_SiKi), 0.0_SiKi )  ! make sure the Frequencies are still monotonically increasing
        ENDIF
        
           ! add the two points for step-change after last entered frequency
        Data4D%WvFreq2( Data4D%NumWvFreq2-1 )     = Data4D%WvFreq2(Data4D%NumWvFreq2-2) + 10.0_SiKi*EPSILON(0.0_SiKi)
        Data4D%WvFreq2( Data4D%NumWvFreq2   )     = HUGE(1.0_SiKi)/5 ! floating overflow occurs later with arithmetic so I divided by a small constant
  
negative.code: ! distributed under the License is distributed on an "AS IS" BASIS,
  ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ! See the License for the specific language governing permissions and
  !
  !**********************************************************************************************************************************
  MODULE WAMIT2
  
  