-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspaces.py
30 lines (21 loc) · 853 Bytes
/
spaces.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from dolfin import *
# Optimization options for the form compiler
parameters["form_compiler"]["cpp_optimize"] = True
parameters["form_compiler"]["optimize"] = True
mesh = Mesh()
with XDMFFile("Mesh/Mesh.xdmf") as infile:
infile.read(mesh)
#mesh = BoxMesh(Point (-1,-1,0), Point (1,1,-0.1), 10, 10, 1)
#mesh = UnitSquareMesh(100, 100)
# boundaries = MeshFunction("size_t", mesh, "./Mesh/Mesh_boundaries.xdmf")
###############################################################################
V=VectorElement("Lagrange",mesh.ufl_cell(),2)
W=FiniteElement("Lagrange",mesh.ufl_cell(),1)
Q=FiniteElement("Lagrange",mesh.ufl_cell(),1)
TH3=MixedElement([V, W, Q])
TH=MixedElement([V, Q])
X=FunctionSpace(mesh,TH)
X3=FunctionSpace(mesh,TH3)
Uv=FunctionSpace(mesh,V)
Uw=FunctionSpace(mesh,W)
Up=FunctionSpace(mesh,Q)