GridapROMs.Utils

GridapROMs.Utils.ContributionType
abstract 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.

source
GridapROMs.Utils.compute_errorMethod
compute_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.

source
GridapROMs.Utils.compute_relative_errorMethod
compute_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.

source
GridapROMs.Utils.compute_speedupMethod
compute_speedup(t1::CostTracker,t2::CostTracker) -> Speedup

Computes the speedup the tracker t2 achieves with respect to t1, in time and in memory footprint

source
GridapROMs.Utils.contributionMethod
contribution(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

source
GridapROMs.Utils.find_closest_viewMethod
find_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)

source
GridapROMs.Utils.get_parentMethod
get_parent(t::Triangulation) -> Triangulation

When t is a triangulation view, returns its parent; throws an error when t is not a triangulation view

source
GridapROMs.Utils.is_includedMethod
is_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

source
GridapROMs.Utils.is_parentMethod
is_parent(tparent::Triangulation,tchild::Triangulation) -> Bool

Returns true if tchild is a triangulation view of tparent, false otherwise

source
GridapROMs.Utils.merge_triangulationsMethod
merge_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

source
GridapROMs.Utils.order_domainsMethod
order_domains(
  tparents::Tuple{Vararg{Triangulation}},
  tchildren::Tuple{Vararg{Triangulation}}
  ) -> Tuple{Vararg{Triangulation}}

Orders the triangulation children in the same way as the triangulation parents

source