Skip to content

Shorthand for adding multiple fields to the dofhandler #1275

@KnutAM

Description

@KnutAM

Original suggestion here #676, with #872 we could have

fields = (u = Lagrange{RefTriangle, 2}()^2, p = Lagrange{RefTriangle, 1}())
qr = QuadratureRule{RefTriangle}(2)
ipg = geometric_interpolation(grid)

dh = DofHandler(grid)
add!(dh, fields)
close!(dh)

cmv = MultiFieldCellValues(qr, fields, ipg)

(And for convenience we could also support dh = DofHandler(grid, fields) which closes automatically which is nice for quick examples :))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions