This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Incorporating input data from quadrature points to the code

+2 votes

Hi,

I am trying to incorporate a vector field that is read in from an xml file to solve a problem. Say for a 3D conduction problem, the isotropic conductivity tensor (Dmat) was prescribed in the past using:

Dconst = 1e2
Dmat = Constant(((Dconst, 0.0, 0.0), (0.0,Dconst, 0.0), (0.0, 0.0, Dconst)))

Now, I have an anisotropic conduction field based on the material coordinate vectors that I read in from an xml file at the quadrature points of a mesh i.e.

Vq = VectorFunctionSpace(mesh, "Quadrature", 4)
x1 = Function(Vq)
File(vectorfilename_x1) >> x1
x2 = Function(Vq)
File(vectorfilename_x2) >> x2
x3 = Function(Vq)
File(vectorfilename_x3) >> x3

and I want to make use of them to transform the conductivity tensor in material coordinates to that in cartesian coordinates using the following (which is not working) (with D11, D22 and D33 prescribed):

Dmat = Constant(((D11, 0.0, 0.0), (0.0,D22, 0.0), (0.0, 0.0, D33)))
Q = ((fiber_f0, fiber_s0, fiber_n0))
D = transpose(Q)DmatQ

How should I go about doing it?

Thanks a lot!

asked Aug 25, 2014 by lee FEniCS User (1,170 points)
...