Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifying coupling between fields/components in create_sparsity_pattern #544

Merged
merged 1 commit into from
Dec 6, 2022

Commits on Dec 6, 2022

  1. Specifying coupling between fields/components in `create_sparsity_pat…

    …tern`
    
    This patch implements a new keyword argument `coupling` to
    `create_sparsity_pattern` where the coupling between fields or
    components in the DofHandler can be specified. `coupling` should be a
    matrix of booleans, where rows are test functions and columns the
    unknowns. Consider for example a system with (u, p) as unknowns, and (v,
    q) as the corresponding test functions. If there is no coupling between
    e.g. p and q the coupling matrix would be
            u      p
            -------------
        v  | true  true
        q  | true  false
    
    i.e. `coupling = [true true; true false]`. The coupling can also be
    specified component wise (if one of the fields have multiple
    components). For example, if (u, v) have two components, the equivalent
    coupling specified by components would be
             u1     u2    p
            ------------------
        v1 | true  true  true
        v2 | true  true  true
        q  | true  true  false
    
    The resulting sparsity pattern will not have entries for components that
    do not couple. By default full coupling is assumed (just like
    before).
    
    The new functionality is used in the stokes-flow.jl example, where there
    are no coupling between test- and trial functions for the pressure.
    fredrikekre committed Dec 6, 2022
    Configuration menu
    Copy the full SHA
    cd8b7c2 View commit details
    Browse the repository at this point in the history