#include <isotropicelasticeqvar.h>
Public Member Functions | |
unsigned | n_max_dof_coupling () |
Point3D | get_global_dof_position (Index cDof) |
const VecIndex & | local_to_global_dofs_map () |
void | setCell (OrthoMesh::Cell_It &cell) |
int | nullProduct (unsigned i, unsigned j) |
double | localEqVar (unsigned i, unsigned j, unsigned qPoint) |
double | localRHS (unsigned i, unsigned j) |
IsotropicElasticEqVar (OrthoMesh &mesh, VecDouble &cK, double l1, double l2, Function3D &fD, Function3D &fN, unsigned debugLevel=0) | |
Private Types | |
enum | COMPONENTS { U0, U1, U2 } |
Private Attributes | |
FE_Q< 3 > | m_FE |
FESystem< 3 > | m_FES |
QGauss< 3 > | m_cQG |
QGauss< 2 > | m_fQG |
VecIndex | m_global_dofs_map |
OrthoMesh & | m_mesh |
double | m_l1 |
double | m_l2 |
Static Private Attributes | |
static const Index | m_local_dof_face_cell_map [6][4] |
Definition at line 11 of file isotropicelasticeqvar.h.
enum IsotropicElasticEqVar::COMPONENTS [private] |
IsotropicElasticEqVar::IsotropicElasticEqVar | ( | OrthoMesh & | mesh, | |
VecDouble & | cK, | |||
double | l1, | |||
double | l2, | |||
Function3D & | fD, | |||
Function3D & | fN, | |||
unsigned | debugLevel = 0 | |||
) |
Definition at line 14 of file isotropicelasticeqvar.cpp.
00015 :m_FE(1),m_FES(m_FE,3),m_cQG(2),m_fQG(2), //Initialize finite element and quadrature rules for cells and faces 00016 m_global_dofs_map(OrthoMesh::VERTICES_PER_CELL*3),m_mesh(mesh),m_l1(l1),m_l2(l2) 00017 { 00018 initFEValues(m_mesh,m_FES,m_cQG,m_fQG, update_quadrature_points|update_gradients|update_JxW_values|update_values, update_JxW_values|update_values|update_quadrature_points); 00019 00020 }
Given the local dof number relative to the cell, the method returns the location of this dof at the original mesh
Definition at line 27 of file isotropicelasticeqvar.h.
const VecIndex& IsotropicElasticEqVar::local_to_global_dofs_map | ( | ) | [inline] |
Definition at line 30 of file isotropicelasticeqvar.h.
00030 {return m_global_dofs_map;}
double IsotropicElasticEqVar::localEqVar | ( | unsigned | i, | |
unsigned | j, | |||
unsigned | qPoint | |||
) |
Definition at line 55 of file isotropicelasticeqvar.cpp.
00056 { 00057 unsigned iComp=local_dof_component(i); 00058 unsigned jComp=local_dof_component(j); 00059 const Tensor<1,DIM>& gradV = shape_grad(i,qPoint); 00060 double l1 = m_l1; 00061 double l2 = m_l2; 00062 switch(iComp) 00063 { 00064 case U0: 00065 { 00066 00067 switch(jComp) 00068 { 00069 case U0: 00070 return ( 00071 (l1+2*l2)*shape_grad(j,qPoint)[0]*gradV[0] + 00072 l2*shape_grad(j,qPoint)[1]*gradV[1] + 00073 l2*shape_grad(j,qPoint)[2]*gradV[2])*JxW(qPoint); 00074 case U1: 00075 return ( 00076 l1*shape_grad(j,qPoint)[1]*gradV[0]+ 00077 l2*shape_grad(j,qPoint)[0]*gradV[1])*JxW(qPoint); 00078 case U2: 00079 return ( 00080 l1*shape_grad(j,qPoint)[2]*gradV[0] + 00081 l2*shape_grad(j,qPoint)[0]*gradV[2])*JxW(qPoint); 00082 } 00083 } 00084 case U1: 00085 { 00086 switch (jComp) 00087 { 00088 case U0: 00089 return ( 00090 l2*shape_grad(j,qPoint)[1]*gradV[0] + 00091 l1*shape_grad(j,qPoint)[0]*gradV[1] 00092 )*JxW(qPoint); 00093 case U1: 00094 return ( 00095 l2 *shape_grad(j,qPoint)[0]*gradV[0]+ 00096 (l1+2*l2)*shape_grad(j,qPoint)[1]*gradV[1]+ 00097 l2 *shape_grad(j,qPoint)[2]*gradV[2] 00098 )*JxW(qPoint); 00099 case U2: 00100 return ( 00101 l1*shape_grad(j,qPoint)[2]*gradV[1] + 00102 l2*shape_grad(j,qPoint)[1]*gradV[2] 00103 )*JxW(qPoint); 00104 } 00105 } 00106 case U2: //To do 00107 { 00108 switch (jComp) 00109 { 00110 case U0: 00111 return ( 00112 l2*shape_grad(j,qPoint)[2]*gradV[0] + 00113 l1*shape_grad(j,qPoint)[0]*gradV[2] 00114 )*JxW(qPoint); 00115 case U1: 00116 return ( 00117 l2*shape_grad(j,qPoint)[2]*gradV[1] + 00118 l1*shape_grad(j,qPoint)[1]*gradV[2] 00119 )*JxW(qPoint); 00120 case U2: 00121 return ( 00122 l2 *shape_grad(j,qPoint)[0]*gradV[0]+ 00123 l2 *shape_grad(j,qPoint)[1]*gradV[1]+ 00124 (l1+2*l2)*shape_grad(j,qPoint)[2]*gradV[2] 00125 )*JxW(qPoint); 00126 } 00127 } 00128 } 00129 assert(0); //If reached this part there is a bug. 00130 return NAN; 00131 }
double IsotropicElasticEqVar::localRHS | ( | unsigned | i, | |
unsigned | j | |||
) |
Definition at line 142 of file isotropicelasticeqvar.cpp.
unsigned IsotropicElasticEqVar::n_max_dof_coupling | ( | ) | [inline] |
Look the size of the freak. 81 elements per line, gosh
Definition at line 26 of file isotropicelasticeqvar.h.
int IsotropicElasticEqVar::nullProduct | ( | unsigned | i, | |
unsigned | j | |||
) |
Definition at line 136 of file isotropicelasticeqvar.cpp.
void IsotropicElasticEqVar::setCell | ( | OrthoMesh::Cell_It & | cell | ) |
Reimplemented from DealFEWrapper.
Definition at line 40 of file isotropicelasticeqvar.cpp.
00041 { 00042 DealFEWrapper::setCell(cell); 00043 unsigned i=0; 00044 //Make the local to global dof mapping 00045 for (unsigned v=0;v<OrthoMesh::VERTICES_PER_CELL;v++) 00046 { 00047 for (unsigned comp=0;comp<3;comp++) 00048 { 00049 m_global_dofs_map[i++]=cell->vertex_index(static_cast<VertexDirection3D>(v))+m_mesh.numVertices()*comp; 00050 } 00051 } 00052 }
QGauss<3> IsotropicElasticEqVar::m_cQG [private] |
Definition at line 16 of file isotropicelasticeqvar.h.
FE_Q<3> IsotropicElasticEqVar::m_FE [private] |
Definition at line 14 of file isotropicelasticeqvar.h.
FESystem<3> IsotropicElasticEqVar::m_FES [private] |
Definition at line 15 of file isotropicelasticeqvar.h.
QGauss<2> IsotropicElasticEqVar::m_fQG [private] |
Definition at line 17 of file isotropicelasticeqvar.h.
Definition at line 18 of file isotropicelasticeqvar.h.
double IsotropicElasticEqVar::m_l1 [private] |
Definition at line 22 of file isotropicelasticeqvar.h.
double IsotropicElasticEqVar::m_l2 [private] |
Definition at line 22 of file isotropicelasticeqvar.h.
const Index IsotropicElasticEqVar::m_local_dof_face_cell_map [static, private] |
{{0,2,4,6}, {1,3,5,7}, {0,1,4,5}, {2,3,6,7}, {0,1,2,3}, {4,5,6,7}}
Definition at line 19 of file isotropicelasticeqvar.h.
OrthoMesh& IsotropicElasticEqVar::m_mesh [private] |
Definition at line 20 of file isotropicelasticeqvar.h.