Skip to content

creating DG0 feilds computationally without floating point error. #4022

Open
@karimnorouzi

Description

@karimnorouzi

when we want to create a DG0 field like:

assemble(sum(Constant(v)/CellVolume(mesh)*dx(i+1) for i, v in enumerate(val)))

the floating point error sometimes creates large distortion.
as per recommandation from Colin Cotter:

"This could be fixed by adding floor/ceil to UFL (and then handling in the form compiler).
6:03
If you raise this as an issue in Firedrake then someone can give you advise on how to do it."

How to do this ?

thanks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions