Gridap.Helpers

Gridap.Helpers.set_execution_modeMethod
set_execution_mode(new_mode::String)

Sets the execution mode to either "debug" or "performance", which controls the behavior of the @check macro within the Gridap package.

  • Debug mode (default): The @check macro will be active, which activates consistency checks within the library. This mode is recommended for development and debugging purposes.

  • Performance mode: The @check macro will be deactivated. This mode is recommended for production runs, where no errors are expected.

Pre-defined functions set_debug_mode and set_performance_mode are also available. Feature only available in Julia 1.6 and later due to restrictions from Preferences.jl.

source
Gridap.Helpers.tfillMethod
tfill(v, ::Val{D}) where D

Returns a tuple of length D that contains D times the object v. In contrast to tuple(fill(v,D)...) which returns the same result, this function is type-stable.

source
Gridap.Helpers.@checkMacro

@check condition @check condition "Error message"

Macro used to make sure that condition is fulfilled, like @assert but the check gets deactivated when running Gridap in performance mode.

source