📄 cell_inf_prism12.c
字号:
{ libmesh_assert (_nodes != NULL); libmesh_assert (sc < this->n_sub_elem()); libmesh_assert (iop != INVALID_IO_PACKAGE); switch (iop) { case TECPLOT: { conn.resize(8); switch (sc) { case 0: // guess this is a collapsed hex8 conn[0] = this->node(0)+1; conn[1] = this->node(6)+1; conn[2] = this->node(8)+1; conn[3] = this->node(8)+1; conn[4] = this->node(3)+1; conn[5] = this->node(9)+1; conn[6] = this->node(11)+1; conn[7] = this->node(11)+1; return; case 1: conn[0] = this->node(6)+1; conn[1] = this->node(7)+1; conn[2] = this->node(8)+1; conn[3] = this->node(8)+1; conn[4] = this->node(9)+1; conn[5] = this->node(10)+1; conn[6] = this->node(11)+1; conn[7] = this->node(11)+1; return; case 2: conn[0] = this->node(6)+1; conn[1] = this->node(1)+1; conn[2] = this->node(7)+1; conn[3] = this->node(7)+1; conn[4] = this->node(9)+1; conn[5] = this->node(4)+1; conn[6] = this->node(10)+1; conn[7] = this->node(10)+1; return; case 3: conn[0] = this->node(8)+1; conn[1] = this->node(7)+1; conn[2] = this->node(2)+1; conn[3] = this->node(2)+1; conn[4] = this->node(11)+1; conn[5] = this->node(10)+1; conn[6] = this->node(5)+1; conn[7] = this->node(5)+1; return; default: libmesh_error(); } } default: libmesh_error(); } libmesh_error();}unsigned short int InfPrism12::second_order_adjacent_vertex (const unsigned int n, const unsigned int v) const{ libmesh_assert (n >= this->n_vertices()); libmesh_assert (n < this->n_nodes()); libmesh_assert (v < 2); return _second_order_adjacent_vertices[n-this->n_vertices()][v]; }const unsigned short int InfPrism12::_second_order_adjacent_vertices[6][2] = { { 0, 1}, // vertices adjacent to node 6 { 1, 2}, // vertices adjacent to node 7 { 0, 2}, // vertices adjacent to node 8 { 3, 4}, // vertices adjacent to node 9 { 4, 5}, // vertices adjacent to node 10 { 3, 5} // vertices adjacent to node 11};std::pair<unsigned short int, unsigned short int>InfPrism12::second_order_child_vertex (const unsigned int n) const{ libmesh_assert (n >= this->n_vertices()); libmesh_assert (n < this->n_nodes()); return std::pair<unsigned short int, unsigned short int> (_second_order_vertex_child_number[n], _second_order_vertex_child_index[n]);}const unsigned short int InfPrism12::_second_order_vertex_child_number[12] ={ 99,99,99,99,99,99, // Vertices 0,1,0, // Edges 0,1,0 // Faces};const unsigned short int InfPrism12::_second_order_vertex_child_index[12] ={ 99,99,99,99,99,99, // Vertices 1,2,2, // Edges 4,5,5 // Faces};#ifdef ENABLE_AMRconst float InfPrism12::_embedding_matrix[4][12][12] ={ // embedding matrix for child 0 { // 0 1 2 3 4 5 6 7 8 9 10 11 th parent Node { 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, // 0th child N. { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0}, // 1 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0}, // 2 { 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, // 3 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0}, // 4 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0}, // 5 { 0.375, -0.125, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0, 0.0, 0.0, 0.0}, // 6 { 0.0, -0.125, -0.125, 0.0, 0.0, 0.0, 0.5, 0.25, 0.5, 0.0, 0.0, 0.0}, // 7 { 0.375, 0.0, -0.125, 0.0, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0, 0.0}, // 8 { 0.0, 0.0, 0.0, 0.375, -0.125, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0}, // 9 { 0.0, 0.0, 0.0, 0.0, -0.125, -0.125, 0.0, 0.0, 0.0, 0.5, 0.25, 0.5}, // 10 { 0.0, 0.0, 0.0, 0.375, 0.0, -0.125, 0.0, 0.0, 0.0, 0.0, 0.0, 0.75} // 11 }, // embedding matrix for child 1 { // 0 1 2 3 4 5 6 7 8 9 10 11 th parent Node { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0}, // 0th child N. { 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, // 1 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0}, // 2 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0}, // 3 { 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, // 4 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0}, // 5 { -0.125, 0.375, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0, 0.0, 0.0, 0.0}, // 6 { 0.0, 0.375, -0.125, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0, 0.0, 0.0}, // 7 { -0.125, 0.0, -0.125, 0.0, 0.0, 0.0, 0.5, 0.5, 0.25, 0.0, 0.0, 0.0}, // 8 { 0.0, 0.0, 0.0, -0.125, 0.375, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0}, // 9 { 0.0, 0.0, 0.0, 0.0, 0.375, -0.125, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0}, // 10 { 0.0, 0.0, 0.0, -0.125, 0.0, -0.125, 0.0, 0.0, 0.0, 0.5, 0.5, 0.25} // 11 }, // embedding matrix for child 2 { // 0 1 2 3 4 5 6 7 8 9 10 11 th parent Node { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0}, // 0th child N. { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0}, // 1 { 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, // 2 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0}, // 3 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0}, // 4 { 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, // 5 { -0.125, -0.125, 0.0, 0.0, 0.0, 0.0, 0.25, 0.5, 0.5, 0.0, 0.0, 0.0}, // 6 { 0.0, -0.125, 0.375, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0, 0.0, 0.0}, // 7 { -0.125, 0.0, 0.375, 0.0, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0, 0.0}, // 8 { 0.0, 0.0, 0.0, -0.125, -0.125, 0.0, 0.0, 0.0, 0.0, 0.25, 0.5, 0.5}, // 9 { 0.0, 0.0, 0.0, 0.0, -0.125, 0.375, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0}, // 10 { 0.0, 0.0, 0.0, -0.125, 0.0, 0.375, 0.0, 0.0, 0.0, 0.0, 0.0, 0.75} // 11 }, // embedding matrix for child 3 { // 0 1 2 3 4 5 6 7 8 9 10 11 th parent Node { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0}, // 0th child N. { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0}, // 1 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0}, // 2 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0}, // 3 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0}, // 4 { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0}, // 5 { -0.125, 0.0, -0.125, 0.0, 0.0, 0.0, 0.5, 0.5, 0.25, 0.0, 0.0, 0.0}, // 6 { -0.125, -0.125, 0.0, 0.0, 0.0, 0.0, 0.25, 0.5, 0.5, 0.0, 0.0, 0.0}, // 7 { 0.0, -0.125, -0.125, 0.0, 0.0, 0.0, 0.5, 0.25, 0.5, 0.0, 0.0, 0.0}, // 8 { 0.0, 0.0, 0.0, -0.125, 0.0, -0.125, 0.0, 0.0, 0.0, 0.5, 0.5, 0.25}, // 9 { 0.0, 0.0, 0.0, -0.125, -0.125, 0.0, 0.0, 0.0, 0.0, 0.25, 0.5, 0.5}, // 10 { 0.0, 0.0, 0.0, 0.0, -0.125, -0.125, 0.0, 0.0, 0.0, 0.5, 0.25, 0.5} // 11 }};#endif#endif // ifdef ENABLE_INFINITE_ELEMENTS
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -