Hi everyone,
My weak form has a spatial second order finite difference variable such as:
\frac{\partial^2}{\partial^2 \theta}
My 2D domain is a circle and I theta is a function of x[0] and x[1] obviously. I
Here is an example code that I came up with. This just to demonstrate what it is like. I would appreciate any help towards finding a solution.
from fenics import *
from dolfin import *
# Define geometry
radius_c = 1
c_points = 30
xcyl = 0
ycyl = 0
domain = Circle(Point(xcyl, ycyl), radius_c, c_points)
# Mesh the domain
mesh = generate_mesh(domain,10)
plot(mesh)
V = FunctionSpace(mesh, 'P', 1)
f = Expression ( "x[0]", degree = 1 )
(u) = TrialFunction(V)
(v) = TestFunction(V)
a = (u*v)*(1/pddtheta) * dx
# I am confused here. theta is also a dependent variable to x and y.
# my guess is \frac{\partial^2}{\partial \theta^2} term has to be evaluated with a finite-difference scheme
# but I cannot find any reference for me to find a solution.
L = (v*f) * dx
u = Function ( V )
solve ( a == L, u)