funsor icon indicating copy to clipboard operation
funsor copied to clipboard

ODEs, PDEs, quadrature, and finite element analysis

Open fritzo opened this issue 4 years ago • 1 comments
trafficstars

  1. Could we express ODEs in Funsor and then solve them via (approximate) numerical integration methods?
  2. Could we express PDEs in Funsor and then solve them via (approximate) finite element methods, possibly wrapping a backend like FEniCS?
@make_funsor
def Curl(
    field: Funsor[Reals[3]],
    position: Bound,
    position2: Fresh[Reals[3]],
) -> Reals[3]:
    pass  # TODO relies on full autograd implementation


@eager.register(Curl, Tensor, ...):
    return 0


def pressure(
    velocity: Reals[3],
    density: Real,
) -> Real:
    pass

# The following are equivalent:
with SimplicialMesh(x=my_mesh):
    velocity = ...
    assert velocity.inputs["x"] == Reals[3]

@SimplicialMesh.register(Curl, ...)
def meshed_curl_operator(...):
    ...

velocity = ...
assert velocity.inputs["x"] == Bint[my_mesh.num_vertices]

fritzo avatar Mar 17 '21 20:03 fritzo

  1. Could we pose an ODE as a variational problem and solve with an argmax sum-product computation? In particular, could we have both local variables and global variables wrt a continuous time "plate"?

fritzo avatar Mar 02 '22 21:03 fritzo