GridapROMs.Utils
GridapROMs.Utils.ArrayContribution
— Typestruct ArrayContribution{T,N,V,K} <: Contribution
values::V
trians::K
end
Contribution
whose field values
are AbstractArray
s
GridapROMs.Utils.Contribution
— Typeabstract type Contribution end
Collection of values corresponding to a set of triangulations. Similarly to DomainContribution
, the values can be accessed by indexing the corresponding triangulation.
GridapROMs.Utils.MatrixContribution
— Typeconst MatrixContribution{T,V,K} = ArrayContribution{T,2,V,K}
GridapROMs.Utils.PartialDerivative
— Typestruct PartialDerivative{N} <: Function end
Gridap
Map
that implements a partial derivative
GridapROMs.Utils.TupOfArrayContribution
— Typeconst TupOfArrayContribution{T} = Tuple{Vararg{ArrayContribution{T}}}
Specifically allows to deal with tuples of Jacobians in unsteady settings
GridapROMs.Utils.VectorContribution
— Typeconst VectorContribution{T,V,K} = ArrayContribution{T,1,V,K}
GridapROMs.Utils.∂₁
— Typeconst ∂₁ = PartialDerivative{1}
GridapROMs.Utils.∂₂
— Typeconst ∂₂ = PartialDerivative{2}
GridapROMs.Utils.∂₃
— Typeconst ∂₃ = PartialDerivative{3}
GridapROMs.Utils.compute_error
— Methodcompute_error(
sol::AbstractArray{T,N},
sol_approx::AbstractArray{T,N},
args...
) where {T,N} -> Number
Computes the error between sol
and sol_approx
, by default in the Euclidean norm. A different norm (usually represented by a sparse matrix) can be provided as an argument.
GridapROMs.Utils.compute_relative_error
— Methodcompute_relative_error(
sol::AbstractArray{T,N},
sol_approx::AbstractArray{T,N},
args...
) where {T,N} -> Number
Computes the relative error between sol
and sol_approx
, by default in the Euclidean norm. A different norm (usually represented by a sparse matrix) can be provided as an argument.
GridapROMs.Utils.compute_speedup
— Methodcompute_speedup(t1::CostTracker,t2::CostTracker) -> Speedup
Computes the speedup the tracker t2
achieves with respect to t1
, in time and in memory footprint
GridapROMs.Utils.contribution
— Methodcontribution(f,trians) -> Contribution
Constructor of a Contribution
that allows do-block syntax. f
is a function such that
values[i] = f(trians[i]) for i...
This constructor first builds the tuple of values, then builds the Contribution
object from values
and trians
GridapROMs.Utils.find_closest_view
— Methodfind_closest_view(
tparents::Tuple{Vararg{Triangulation}},
tchild::Triangulation
) -> (Integer, Triangulation)
Finds the approximate parent of tchild
; it returns the parent's index and its view in the same indices as tchild
(which should be a triangulation view)
GridapROMs.Utils.get_parent
— Methodget_parent(t::Triangulation) -> Triangulation
When t
is a triangulation view, returns its parent; throws an error when t
is not a triangulation view
GridapROMs.Utils.is_included
— Methodis_included(tchild::Triangulation,tparent::Triangulation) -> Bool
Returns true if tchild
is a triangulation included in tparent
, false otherwise. This condition is not as strong as is_parent
GridapROMs.Utils.is_parent
— Methodis_parent(tparent::Triangulation,tchild::Triangulation) -> Bool
Returns true if tchild
is a triangulation view of tparent
, false otherwise
GridapROMs.Utils.merge_triangulations
— Methodmerge_triangulations(trians::AbstractVector{<:Triangulation}) -> Triangulation
Given a tuple of triangulation views trians
, returns the triangulation view on the union of the viewed cells. In other words, the minimum common integration domain is found
GridapROMs.Utils.order_domains
— Methodorder_domains(
tparents::Tuple{Vararg{Triangulation}},
tchildren::Tuple{Vararg{Triangulation}}
) -> Tuple{Vararg{Triangulation}}
Orders the triangulation children in the same way as the triangulation parents