48 std::ifstream mesh_file(mesh_file_name.c_str(),std::ios_base::in);
58 for(
unsigned i=0;
i<n_node;
i++)
62 mesh_file>>vertinfo[
i];
78 for(
unsigned i=0;
i<n_vx;
i++)
80 mesh_file>>dummy_node_code;
82 mesh_file>>dummy_ucurv;
86 unsigned n_local_node;
87 mesh_file>>n_local_node;
105 for(
unsigned i=0;
i<n_element;
i++)
107 for(
unsigned j=0;j<n_local_node;j++)
109 mesh_file>>global_node[k];
118 for(
unsigned i=0;
i<n_element;
i++)
120 for(
unsigned j=0;j<n_local_node;j++)
122 mesh_file>>edgeinfo[l];
130 std::vector<bool> done (n_node);
131 for(
unsigned i=0;
i<n_node;
i++)
147 std::ifstream curve_file(curve_file_name.c_str(),std::ios_base::in);
163 for(
unsigned i=0;
i<n_curv;
i++)
170 for(
unsigned j=1;j<4;j++)
172 curve_file>>curv[
i][j];
179 for(
unsigned j=1;j<5;j++)
181 curve_file>>curv[
i][j];
186 std::ostringstream error_stream;
187 error_stream <<
"Current we can only process curves of\n" 188 <<
"type 1 (straight lines) and 2 (circular arcs\n" 189 <<
"You've specified: type " << type << std::endl;
193 OOMPH_CURRENT_FUNCTION,
194 OOMPH_EXCEPTION_LOCATION);
202 for(
unsigned i=0;
i<n_curv;
i++)
209 oomph_info<<
"The number of boundaries is "<<d<<std::endl;
225 boundary_of_node.resize(n_node);
227 for(
unsigned i=0;
i<n_node;
i++)
230 boundary_of_node[
i].resize(2);
231 boundary_of_node[
i][0]=-1;
232 boundary_of_node[
i][1]=-1;
235 for(
unsigned j=0;j<n_curv;j++)
237 for(
unsigned m=2;m<curv[j].size();m++)
239 if(curv[j][m]==static_cast<int>(
i+1))
241 boundary_of_node[
i][n]=curv[j][1];
253 boundary_of_node[
i][0]=curv[b-1][1];
263 for(
unsigned e=0;
e<n_element;
e++)
269 for(
unsigned j=0;j<2;j++)
271 c=global_node[count];
276 if((d>0) && ((boundary_of_node[c-1][0] > 0) ||
277 (boundary_of_node[c-1][1] > 0)))
282 if(boundary_of_node[c-1][0] > 0)
284 if(boundary_of_node[c-1][1] > 0)
293 Node_pt[c-1]->x(0)=x_node[c-1];
294 Node_pt[c-1]->x(1)=y_node[c-1];
304 c=global_node[count+1];
308 if((d>0) && ((boundary_of_node[c-1][0]>0) ||
309 (boundary_of_node[c-1][1]>0)))
314 if(boundary_of_node[c-1][0]>0)
316 if(boundary_of_node[c-1][1]>0)
325 Node_pt[c-1]->x(0)=x_node[c-1];
326 Node_pt[c-1]->x(1)=y_node[c-1];
336 c=global_node[count-1];
340 if((d>0) && ((boundary_of_node[c-1][0]>0) ||
341 (boundary_of_node[c-1][1]>0)))
346 if(boundary_of_node[c-1][0]>0)
348 if(boundary_of_node[c-1][1]>0)
357 Node_pt[c-1]->x(0)=x_node[c-1];
358 Node_pt[c-1]->x(1)=y_node[c-1];
Vector< Node * > Node_pt
Vector of pointers to nodes.
void add_boundary_node(const unsigned &b, Node *const &node_pt)
Add a (pointer to) a node to the b-th boundary.
GeompackQuadScaffoldMesh()
Empty constructor.
virtual Node * construct_boundary_node(const unsigned &n)
Construct the local node n as a boundary node; that is a node that MAY be placed on a mesh boundary a...
virtual Node * construct_node(const unsigned &n)
Construct the local node n and return a pointer to the newly created node object. ...
void set_nboundary(const unsigned &nbound)
Set the number of boundaries in the mesh.
Vector< GeneralisedElement * > Element_pt
Vector of pointers to generalised elements.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
FiniteElement * finite_element_pt(const unsigned &e) const
Upcast (downcast?) to FiniteElement (needed to access FiniteElement member functions).
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.