GridapROMs.Utils
GridapROMs.Utils.ArrayContribution
— Typeconst ArrayContribution{T,N} = Contribution{<:Union{AbstractArray{T,N},ArrayBlock{T,N}}}
Contribution
whose field values
are AbstractArray
s
GridapROMs.Utils.Contribution
— Typestruct Contribution{V}
values::Tuple{Vararg{V}}
trians::Tuple{Vararg{Triangulation}}
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.DomainOperator
— TypeGridapROMs.Utils.FEDomainOperator
— TypeGridapROMs.Utils.FEDomains
— Typestruct FEDomains{A,B}
domains_res::A
domains_jac::B
end
Fields:
domains_res
: triangulations relative to the residual (nothing by default)domains_jac
: triangulations relative to the Jacobian (nothing by default)
GridapROMs.Utils.JointDomains
— Typestruct JointDomains <: TriangulationStyle end
Trait for a FE operator indicating that residuals/Jacobians in this operator should be computed summing the contributions relative to each triangulation as occurs in Gridap
GridapROMs.Utils.JointFEOperator
— TypeGridapROMs.Utils.JointOperator
— TypeGridapROMs.Utils.LinearEq
— TypeGridapROMs.Utils.LinearNonlinearEq
— TypeGridapROMs.Utils.MatrixContribution
— Typeconst MatrixContribution{T} = ArrayContribution{T,2}
GridapROMs.Utils.NonlinearEq
— TypeGridapROMs.Utils.OperatorType
— TypeGridapROMs.Utils.PartialDerivative
— Typestruct PartialDerivative{N} <: Function end
Gridap
Map
that implements a partial derivative
GridapROMs.Utils.SplitDomains
— Typestruct SplitDomains <: TriangulationStyle end
Trait for a FE operator indicating that residuals/Jacobians in this operator should be computed keeping the contributions relative to each triangulation separate
GridapROMs.Utils.SplitFEOperator
— TypeGridapROMs.Utils.SplitOperator
— TypeGridapROMs.Utils.TriangulationStyle
— TypeGridapROMs.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} = ArrayContribution{T,1}
GridapROMs.Utils.∂₁
— Typeconst ∂₁ = PartialDerivative{1}
GridapROMs.Utils.∂₂
— Typeconst ∂₂ = PartialDerivative{2}
GridapROMs.Utils.∂₃
— Typeconst ∂₃ = PartialDerivative{3}
GridapROMs.Utils.collect_cell_matrix_for_trian
— Methodfunction collect_cell_matrix_for_trian(
trial::FESpace,
test::FESpace,
a::DomainContribution,
strian::Triangulation
) -> Tuple{Vector{<:Any},Vector{<:Any},Vector{<:Any}}
Computes the cell-wise data needed to assemble a global sparse matrix for a given input triangulation strian
GridapROMs.Utils.collect_cell_vector_for_trian
— Methodfunction collect_cell_vector_for_trian(
test::FESpace,
a::DomainContribution,
strian::Triangulation
) -> Tuple{Vector{<:Any},Vector{<:Any}}
Computes the cell-wise data needed to assemble a global vector for a given input triangulation strian
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.get_fe_operator
— Methodget_fe_operator(op::ParamOperator) -> ParamFEOperator
Fetches the underlying FE operator of an algebraic operator op
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.get_polynomial_order
— Methodget_polynomial_order(f::FESpace) -> Integer
Retrieves the polynomial order of f
GridapROMs.Utils.get_polynomial_orders
— Methodget_polynomial_orders(fs::FESpace) -> Integer
Retrieves the polynomial order of fs
for every dimension
GridapROMs.Utils.is_parent
— Methodis_parent(parent::Triangulation,child::Triangulation) -> Bool
Returns true if child
is a triangulation view of parent
, false otherwise
GridapROMs.Utils.isapprox_parent
— Methodisapprox_parent(parent::Triangulation,child::Triangulation) -> Bool
Same as is_parent
, but with a relaxed check (it could return true even when the objectid
comparison fails)
GridapROMs.Utils.order_domains
— Methodorder_domains(
parents::Tuple{Vararg{Triangulation}},
children::Tuple{Vararg{Triangulation}}
) -> Tuple{Vararg{Triangulation}}
Orders the triangulation children in the same way as the triangulation parents