Skip to content

Commit

Permalink
introduce ndofsglobal for generic types as fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
benegee committed Mar 7, 2024
1 parent 954a502 commit ed6d5a9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/semidiscretization/semidiscretization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,26 @@ Return the number of degrees of freedom associated with each scalar variable.
ndofs(mesh, solver, cache)
end

"""
ndofsglobal(semi::AbstractSemidiscretization)
Return the global number of degrees of freedom associated with each scalar variable.
"""
@inline function ndofsglobal(semi::AbstractSemidiscretization)
mesh, _, solver, cache = mesh_equations_solver_cache(semi)
ndofsglobal(mesh, solver, cache)
end

"""
ndofsglobal(mesh, solver, cache)
Return the global number of degrees of freedom associated with each scalar variable.
Defaults to ndofs when there is no special implementation for parallel computations.
"""
@inline function ndofsglobal(mesh, solver, cache)
ndofs(mesh, solver, cache)
end

"""
integrate_via_indices(func, u_ode, semi::AbstractSemidiscretization, args...; normalize=true)
Expand Down

0 comments on commit ed6d5a9

Please sign in to comment.