tensor_tools.C
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 #include "libmesh/tensor_tools.h"
19 #include "libmesh/vector_value.h"
20 #include "libmesh/tensor_value.h"
21 #include "libmesh/type_n_tensor.h"
22 
23 namespace libMesh
24 {
25  namespace TensorTools
26  {
27  // Needed for ExactSolution to compile
29  {
30  libMesh::err << "Operation not defined for scalar quantities." << std::endl;
31  libmesh_error();
32  }
33 
35  {
36  const Number duz_dy = grad(2,1);
37  const Number duy_dz = grad(1,2);
38  const Number dux_dz = grad(0,2);
39  const Number duz_dx = grad(2,0);
40  const Number duy_dx = grad(1,0);
41  const Number dux_dy = grad(0,1);
42 
43  return VectorValue<Number>( duz_dy - duy_dz, dux_dz - duz_dx, duy_dx - dux_dy);
44  }
45 
46  // Needed for ExactSolution to compile. Will implement when needed.
48  {
49  libmesh_not_implemented();
50  }
51 
52  // Needed for ExactSolution to compile
54  {
55  libMesh::err << "Operation not defined for scalar quantities." << std::endl;
56  libmesh_error();
57  }
58 
60  {
61  const Number dux_dx = grad(0,0);
62  const Number duy_dy = grad(1,1);
63  const Number duz_dz = grad(2,2);
64 
65  return dux_dx + duy_dy + duz_dz;
66  }
67 
68  // Needed for ExactSolution to compile. Will implement when needed.
70  {
71  libmesh_not_implemented();
72  }
73 
74  }
75 }

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:07 UTC

Hosted By:
SourceForge.net Logo