39 template<
typename T,
typename Timg>
50 this->class_name =
"Cmesh_global";
67 for (
int i=0; i<this->num_var(); i++){this->m_grid.push_back(oImage.cur_dim(i));}
69 this->m_node.assign(this->num_var(), 1,1,1,1, 0);
72 this->m_connect.assign(1, this->m_dof);
73 if (this->m_verbose){printf(
"\tConnectivity table : [%i](%i)\n",this->m_connect.size(),this->m_connect[0].width());}
75 this->m_win.assign(3,0);
76 this->m_pitch.assign(3,0);
77 for (
int i=0; i<3; i++){this->m_win[i] = oImage.cur_dim(i); this->m_pitch[i] = oImage.cur_dim(i);}
79 this->m_numPix = oImage.m_curImg[0].size();
92 cimglist_for(nodes, dim)
94 nodes[dim][0] = ((float)oImage.cur_dim(dim))/2.;
106 cimg_forX(elements[0],nd)
108 elements[0][nd] = nd;
113 virtual int grid_dims(
const int &i)
const
118 case 0:
return this->m_grid[0];
break;
119 case 1:
return this->m_grid[1];
break;
122 {
return this->m_grid[2];}
126 case 3:
return 1;
break;
129 std::cerr<<this->class_name<<
"::"<<__func__<<
": error: id="<<i<<
" which is over [0-3]\n"<<std::flush;
virtual void set_connectivity(const Cimage< Timg > &oImage, const CImgList< T > &nodes, CImgList< int > &elements)
Definition: Cmesh_global.h:99
Definition: Cmesh_generate.h:43
virtual void set_nodes(const Cimage< Timg > &oImage, CImgList< T > &nodes)
Definition: Cmesh_global.h:85
virtual int assign(const Cimage< Timg > &oImage)
Definition: Cmesh_global.h:54
Definition: Cmesh_global.h:40