Gridap.Helpers
Gridap.Helpers
— ModuleThis module provides a set of helper macros and helper functions
The exported macros are:
Gridap.Helpers.GridapType
— Typeabstract type GridapType end
Gridap.Helpers.first_and_tail
— Methodfirst_and_tail(a::Tuple)
Equivalent to (first(a), Base.tail(a))
.
Gridap.Helpers.get_val_parameter
— Methodget_val_parameter(::Val{T}) where T
get_val_parameter(::Type{Val{T}}) where T
Returns T
.
Gridap.Helpers.tfill
— Methodtfill(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.
Gridap.Helpers.@abstractmethod
— Macro@abstractmethod
Macro used in generic functions that must be overloaded by derived types.
Gridap.Helpers.@check
— Macro@check condition @check condition "Error message"
Macro used to make sure that condition is fulfilled, like @assert
but the check gets deactivated when running Julia with –boundscheck=no
Gridap.Helpers.@notimplemented
— Macro@notimplemented
@notimplemented "Error message"
Macro used to raise an error, when something is not implemented.
Gridap.Helpers.@notimplementedif
— Macro@notimplementedif condition
@notimplementedif condition "Error message"
Macro used to raise an error if the condition
is true
Gridap.Helpers.@unreachable
— Macro@unreachable
@unreachable "Error message"
Macro used to make sure that a line of code is never reached.