Skip to content
Snippets Groups Projects
Commit 82ed78cf authored by Andreas Dedner's avatar Andreas Dedner
Browse files

added some more examples of ufl models with explicit/implicit parts

parent b05e0769
No related branches found
No related tags found
No related merge requests found
Pipeline #11168 failed
dune_add_subdirs(euler)
set(uflfiles
advection.ufl
diffusion.ufl
advectiondiffusion.ufl
)
dune_fem_add_elliptic_models(${uflfiles})
set(headers)
foreach(uflfile ${uflfiles})
get_filename_component(base ${uflfile} NAME_WE)
list(APPEND headers ${base}.hh)
endforeach()
add_custom_target(models DEPENDS ${headers})
space = Space(2, 1)
u, v = TrialFunction(space), TestFunction(space)
x = SpatialCoordinate(space.cell())
b = as_vector( [1,1] )
models = {"Explicit":u[0]*dot(b,grad(v[0])) * dx}
space = Space(2, 1)
u, v = TrialFunction(space), TestFunction(space)
x = SpatialCoordinate(space.cell())
b = as_vector( [1,1] )
Fc = u[0]*dot(b,grad(v[0])) * dx
Fd = inner(grad(u),grad(v)) * dx
g1 = as_vector([x[1]*cos(x[0]),sin(x[0])])
bc1 = DirichletBC(space, g1, 1)
models = {"Explicit":Fc, "Implicit":[Fd,bc1]}
space = Space(2, 1)
u, v = TrialFunction(space), TestFunction(space)
x = SpatialCoordinate(space.cell())
F = inner(grad(u),grad(v)) * dx
g1 = as_vector([x[1]*cos(x[0]),sin(x[0])])
bc1 = DirichletBC(space, g1, 1)
models = {"Implicit":[F,bc1]}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment