⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cell_hex27.c

📁 一个用来实现偏微分方程中网格的计算库
💻 C
📖 第 1 页 / 共 5 页
字号:
	    conn[2] = this->node(22);	    conn[3] = this->node(26);	    conn[4] = this->node(16);	    conn[5] = this->node(5);	    conn[6] = this->node(17);	    conn[7] = this->node(25);	    return;      	  case 6:	    conn[0] = this->node(24);	    conn[1] = this->node(26);	    conn[2] = this->node(23);	    conn[3] = this->node(15);	    conn[4] = this->node(19);	    conn[5] = this->node(25);	    conn[6] = this->node(18);	    conn[7] = this->node(7); 	    return;      	  case 7:      	    conn[0] = this->node(26);	    conn[1] = this->node(22);	    conn[2] = this->node(14);	    conn[3] = this->node(23);	    conn[4] = this->node(25);	    conn[5] = this->node(17);	    conn[6] = this->node(6);	    conn[7] = this->node(18);	    return;	  default:	    libmesh_error();      	  }      }    default:      libmesh_error();    }  libmesh_error();}unsigned int Hex27::n_second_order_adjacent_vertices (const unsigned int n) const{  switch (n)    {      case 8:      case 9:      case 10:      case 11:      case 12:      case 13:      case 14:      case 15:      case 16:      case 17:      case 18:      case 19:	return 2;      case 20:      case 21:      case 22:      case 23:      case 24:      case 25:	return 4;      case 26:	return 8;      default:	libmesh_error();    }  libmesh_error();  return libMesh::invalid_uint;}unsigned short int Hex27::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());  switch (n)    {      /*       * these are all nodes that are unique to Hex27,       * use our _remaining.... matrix       */      case 20:      case 21:      case 22:      case 23:      case 24:      case 25:      {	libmesh_assert (v < 4);        return _remaining_second_order_adjacent_vertices[n-20][v];       }      /*       * for the bubble node the return value is simply v.       * Why? -- the user asks for the v-th adjacent vertex,       * from \p n_second_order_adjacent_vertices() there       * are 8 adjacent vertices, and these happen to be       * 0..7       */      case 26:      {	libmesh_assert (v < 8);	return static_cast<unsigned short int>(v);      }      /*       * nodes 8..19:       * these are all nodes that are identical for       * Hex20 and Hex27.  Therefore use the        * matrix stored in cell_hex.C       */      default:      {	libmesh_assert (v < 2);        return _second_order_adjacent_vertices[n-this->n_vertices()][v];       }    }}const unsigned short int Hex27::_remaining_second_order_adjacent_vertices[6][4] = {  { 0,  1,  2,  3}, // vertices adjacent to node 20   face nodes  { 0,  1,  4,  5}, // vertices adjacent to node 21  { 1,  2,  5,  6}, // vertices adjacent to node 22  { 2,  3,  6,  7}, // vertices adjacent to node 23  { 0,  3,  4,  7}, // vertices adjacent to node 24  { 4,  5,  6,  7}, // vertices adjacent to node 25};std::pair<unsigned short int, unsigned short int>Hex27::second_order_child_vertex (const unsigned int n) const{  libmesh_assert (n >= this->n_vertices());  libmesh_assert (n < this->n_nodes());  /*   * the _second_order_vertex_child_* vectors are   * stored in cell_hex.C, since they are identical   * for Hex20 and Hex27 (for the first 12 higher-order nodes)   */  return std::pair<unsigned short int, unsigned short int>    (_second_order_vertex_child_number[n],     _second_order_vertex_child_index[n]);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -