Box and BoxMesh Produced different Matrices
I have the code below that I used with FEniCs version 1.0.0
from dolfin import *
import numpy
import scipy.io
# Create mesh and define function space
mesh=Box(0, 0, 0, 2, 0.7, 0.3, 20, 7, 3);
V = FunctionSpace(mesh, 'CG', 1)
# Define variational problem
u = TrialFunction(V)
v = TestFunction(V)
chi = 1400.0
C = 1.0
sigmaij = as_matrix(
a1 = C*u*v*dx
a2 = -inner(
A = assemble(a1)
B = assemble(a2)
A = A.array();
B = B.array();
msh = mesh.coordinate
scipy.io.
and Now with the recent version, Box does not work in version 1.1.0. I changed it to BoxMesh. Now the code looks like
from dolfin import *
import numpy
import scipy.io
# Create mesh and define function space
mesh=BoxMesh(0, 0, 0, 2, 0.7, 0.3, 20, 7, 3);
V = FunctionSpace(mesh, 'CG', 1)
# Define variational problem
u = TrialFunction(V)
v = TestFunction(V)
chi = 1400.0
C = 1.0
sigmaij = as_matrix(
a1 = C*u*v*dx
a2 = -inner(
A = assemble(a1)
B = assemble(a2)
A = A.array();
B = B.array();
msh = mesh.coordinate
scipy.io.
The issue with my code is that Matrix A from version 1.0.0 is different from version 1.1.0.
The problem is that my code does not work properly anymore.
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Oluwaseun Sharomi
- Solved:
- Last query:
- Last reply: