thelfer / MFrontGenericInterfaceSupport

This project aims at providing support for MFront generic behaviours. This project can be embedded in open-source and propriary sofware
38 stars 35 forks source link

[fortran] Some bindings are returning a NaN value #39

Closed pbouda95 closed 4 years ago

pbouda95 commented 4 years ago

Several bindings are returning a NaN value, whichever the arguments:

  1. material_state_manager_get_uniform_external_state_variables
  2. material_state_manager_get_uniform_material_property

My first investigations were not fruitful so I am opening this ticket ...

Cheers,

thelfer commented 4 years ago

The issue boils down to this test, which was meant to invalidate the result if the calll was unsucessful:

  if( r % exit_status .eq. MGIS_SUCCESS) then
       v = ieee_value(v, ieee_quiet_nan)
    end if

This shall be:

  if( r % exit_status .ne. MGIS_SUCCESS) then
       v = ieee_value(v, ieee_quiet_nan)
    end if

Thanks for reporting !