COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Reader.cpp
Go to the documentation of this file.
1 // Copyright (C) 2010-2013 von Karman Institute for Fluid Dynamics, Belgium
2 //
3 // This software is distributed under the terms of the
4 // GNU Lesser General Public License version 3 (LGPLv3).
5 // See doc/lgpl.txt and doc/gpl.txt for the license text.
6 
7 #include <set>
8 
9 #include "common/Log.hpp"
10 #include "common/Builder.hpp"
12 #include "common/OptionList.hpp"
13 #include "common/OptionT.hpp"
14 #include "common/StreamHelpers.hpp"
15 #include "common/Foreach.hpp"
17 #include "common/Tags.hpp"
18 #include "common/DynTable.hpp"
19 #include "common/List.hpp"
20 #include "common/PropertyList.hpp"
21 
22 #include "mesh/Mesh.hpp"
23 #include "mesh/Region.hpp"
26 #include "mesh/Elements.hpp"
27 #include "mesh/MeshElements.hpp"
28 #include "mesh/Field.hpp"
29 #include "mesh/Connectivity.hpp"
30 #include "mesh/Space.hpp"
31 #include "mesh/MeshTransformer.hpp"
32 
33 #include "mesh/neu/Reader.hpp"
34 
36 
37 namespace cf3 {
38 namespace mesh {
39 namespace neu {
40 
41  using namespace common;
42 
44 
46 
48 
49 Reader::Reader( const std::string& name )
50 : MeshReader(name),
51  Shared()
52 {
53  // options
54  options().add("read_groups" ,true)
55  .description("Reads neu Groups and splits the mesh in these subgroups")
56  .pretty_name("Unified Zones");
57 
58  options().add("part", PE::Comm::instance().rank())
59  .description("Number of the part of the mesh to read. (e.g. rank of processor)")
60  .pretty_name("Part");
61 
62  options().add("nb_parts", PE::Comm::instance().size())
63  .description("Total nb_partitions. (e.g. number of processors)");
64 
65  options().add("read_boundaries", true)
66  .description("Read the surface elements for the boundary")
67  .pretty_name("Read Boundaries");
68 
69  properties()["brief"] = std::string("neutral file mesh reader component");
70 
71  std::string desc;
72  desc += "This component can read in parallel.\n";
73  desc += "Available coolfluid-element types are:\n";
74  boost_foreach(const std::string& supported_type, m_supported_types)
75  desc += " - " + supported_type + "\n";
76  properties()["description"] = desc;
77 }
78 
80 
81 std::vector<std::string> Reader::get_extensions()
82 {
83  std::vector<std::string> extensions;
84  extensions.push_back(".neu");
85  return extensions;
86 }
87 
89 
91 {
92 
93  // if the file is present open it
94  boost::filesystem::path fp (file.path());
95  if( boost::filesystem::exists(fp) )
96  {
97  CFinfo << "Opening file " << fp.string() << CFendl;
98  m_file.open(fp,std::ios_base::in); // exists so open it
99  }
100  else // doesnt exist so throw exception
101  {
102  throw boost::filesystem::filesystem_error( fp.string() + " does not exist", boost::system::error_code() );
103  }
104 
105  // set the internal mesh pointer
106  m_mesh = Handle<Mesh>(mesh.handle<Component>());
107 
108  // Read file once and store positions
110 
111  // Read mesh information
112  read_headerData();
113 
114  m_mesh->initialize_nodes(0, m_headerData.NDFCD);
115 
116  cf3_assert(m_mesh->geometry_fields().coordinates().row_size() == m_headerData.NDFCD);
117 
118  // Create a hash
119  m_hash = create_component<MergedParallelDistribution>("hash");
120  std::vector<Uint> num_obj(2);
121  num_obj[0] = m_headerData.NUMNP;
122  num_obj[1] = m_headerData.NELEM;
123  m_hash->options().set("nb_obj",num_obj);
124 
125  // Create a region component inside the mesh with the name mesh_name
126  //if (option("new_api").value<bool>())
127  m_region = m_mesh->topology().handle<Region>();
128  //else
129  // m_region = m_mesh->create_region(m_headerData.mesh_name,!option("Serial Handle<Region>(Merge").value<bool>()).handle<Component>());
130 
134  if (options().value<bool>("read_boundaries"))
135  read_boundaries();
136 
137  if (options().value<bool>("read_groups"))
138  read_groups();
139 
140  // clean-up
141  // --------
142  // Remove regions with empty connectivity tables
144 
145 
146  boost_foreach(Elements& elements, find_components_recursively<Elements>(m_mesh->topology()))
147  {
148  elements.rank().resize(elements.size());
149  Uint my_rank = options().value<Uint>("part");
150  for (Uint e=0; e<elements.size(); ++e)
151  {
152  elements.rank()[e] = my_rank;
153  }
154  }
155 
156 
157  // close the file
158  m_file.close();
159 
160  cf3_assert(m_mesh->geometry_fields().coordinates().row_size() == m_headerData.NDFCD);
161  cf3_assert(m_mesh->properties().value<Uint>(common::Tags::dimension()) == m_headerData.NDFCD);
162 
163  // Fix global numbering
165  m_mesh->update_statistics();
166 
167  boost::shared_ptr<MeshTransformer> global_numbering = build_component_abstract_type<MeshTransformer>("cf3.mesh.actions.GlobalNumbering","glb_numbering");
168  global_numbering->transform(m_mesh);
169 
170  mesh.raise_mesh_loaded();
171 }
172 
174 
176 {
177  std::string nodal_coordinates("NODAL COORDINATES");
178  std::string elements_cells("ELEMENTS/CELLS");
179  std::string element_group("ELEMENT GROUP");
180  std::string boundary_condition("BOUNDARY CONDITIONS");
181 
182  m_element_group_positions.resize(0);
184 
185  int p;
186  std::string line;
187  while (!m_file.eof())
188  {
189  p = m_file.tellg();
190  getline(m_file,line);
191  if (line.find(nodal_coordinates)!=std::string::npos)
193  else if (line.find(elements_cells)!=std::string::npos)
195  else if (line.find(element_group)!=std::string::npos)
196  m_element_group_positions.push_back(p);
197  else if (line.find(boundary_condition)!=std::string::npos)
198  m_boundary_condition_positions.push_back(p);
199  }
200  m_file.clear();
201 
202 }
203 
205 
207 {
208  m_file.seekg(0,std::ios::beg);
209 
210  Uint NUMNP, NELEM, NGRPS, NBSETS, NDFCD, NDFVL;
211  std::string line;
212 
213  // skip 2 lines
214  for (Uint i=0; i<2; ++i)
215  getline(m_file,line);
216 
217  m_file >> m_headerData.mesh_name; getline(m_file,line);
218 
219  // skip 3 lines
220  for (Uint i=0; i<3; ++i)
221  getline(m_file,line);
222 
223  // read number of points, elements, groups, sets, dimensions, velocitycomponents
224  getline(m_file,line);
225  std::stringstream ss(line);
226  ss >> NUMNP >> NELEM >> NGRPS >> NBSETS >> NDFCD >> NDFVL;
227 
228  m_headerData.NUMNP = NUMNP;
229  m_headerData.NELEM = NELEM;
230  m_headerData.NGRPS = NGRPS;
231  m_headerData.NBSETS = NBSETS;
232  m_headerData.NDFCD = NDFCD;
233  m_headerData.NDFVL = NDFVL;
234 
235  getline(m_file,line);
236 }
237 
239 
241 {
242  m_ghost_nodes.clear();
243 
244  // Only find ghost nodes if the domain is split up
245  if (options().value<Uint>("nb_parts") > 1)
246  {
247  m_file.seekg(m_elements_cells_position,std::ios::beg);
248  // skip next line
249  std::string line;
250  getline(m_file,line);
251 
252 
253  // read every line and store the connectivity in the correct region through the buffer
254  Uint elementNumber, elementType, nbElementNodes, dummy_node;
255  for (Uint i=0; i<m_headerData.NELEM; ++i)
256  {
257  if (m_headerData.NELEM > 100000)
258  {
259  if(i%(m_headerData.NELEM/20)==0)
260  CFinfo << 100*i/m_headerData.NELEM << "% " << CFendl;
261  }
262 
263  if (m_hash->subhash(ELEMS).owns(i))
264  {
265  // element description
266  m_file >> elementNumber >> elementType >> nbElementNodes;
267  cf3_assert_desc(to_str(elementNumber)+" == "+to_str(i+1),elementNumber == i+1);
268  // check if element nodes are ghost
269  std::vector<Uint> neu_element_nodes(nbElementNodes);
270  for (Uint j=0; j<nbElementNodes; ++j)
271  {
272  m_file >> neu_element_nodes[j];
273  if (!m_hash->subhash(NODES).owns(neu_element_nodes[j]-1))
274  {
275  m_ghost_nodes.insert(neu_element_nodes[j]);
276  }
277  }
278  }
279  else
280  {
281  // element description
282  m_file >> elementNumber >> elementType >> nbElementNodes;
283  cf3_assert_desc(to_str(elementNumber)+" == "+to_str(i+1),elementNumber == i+1);
284  // check if element nodes are ghost
285  std::vector<Uint> neu_element_nodes(nbElementNodes);
286  for (Uint j=0; j<nbElementNodes; ++j)
287  {
288  m_file >> dummy_node;
289  }
290  }
291  // finish the line
292  getline(m_file,line);
293  }
294  getline(m_file,line); // ENDOFSECTION
295  }
296 }
297 
299 
301 {
302  m_file.seekg(m_nodal_coordinates_position,std::ios::beg);
303 
304  // Create the nodes
305 
306  Dictionary& nodes = m_mesh->geometry_fields();
307 
308  nodes.resize(m_hash->subhash(NODES).nb_objects_in_part(PE::Comm::instance().rank()) + m_ghost_nodes.size());
309  std::string line;
310  // skip one line
311  getline(m_file,line);
312 
313  // declare and allocate one coordinate row
314  std::vector<Real> rowVector(m_headerData.NDFCD);
315 
316  std::set<Uint>::const_iterator not_found = m_ghost_nodes.end();
317 
318  Uint coord_idx=0;
319  for (Uint neu_node_idx=1; neu_node_idx<=m_headerData.NUMNP; ++neu_node_idx)
320  {
321  if (m_headerData.NUMNP > 100000)
322  {
323  if(neu_node_idx%(m_headerData.NUMNP/20)==0)
324  CFinfo << 100*neu_node_idx/m_headerData.NUMNP << "% " << CFendl;
325  }
326  getline(m_file,line);
327  if (m_hash->subhash(NODES).owns(neu_node_idx-1))
328  {
329  nodes.rank()[coord_idx] = m_hash->subhash(NODES).part_of_obj(neu_node_idx-1);
330  nodes.glb_idx()[coord_idx] = neu_node_idx;
331  m_neu_node_to_coord_idx[neu_node_idx]=coord_idx;
332  std::stringstream ss(line);
333  Uint nodeNumber;
334  ss >> nodeNumber;
335  cf3_assert(nodeNumber == neu_node_idx);
336  for (Uint dim=0; dim<m_headerData.NDFCD; ++dim)
337  ss >> nodes.coordinates()[coord_idx][dim];
338  coord_idx++;
339  }
340  else
341  {
342  if (m_ghost_nodes.find(neu_node_idx) != not_found)
343  {
344  // add global node index
345  nodes.rank()[coord_idx] = m_hash->subhash(NODES).part_of_obj(neu_node_idx-1);
346  nodes.glb_idx()[coord_idx] = neu_node_idx;
347  m_neu_node_to_coord_idx[neu_node_idx]=coord_idx;
348  std::stringstream ss(line);
349  Uint nodeNumber;
350  ss >> nodeNumber;
351  for (Uint dim=0; dim<m_headerData.NDFCD; ++dim)
352  ss >> nodes.coordinates()[coord_idx][dim];
353  coord_idx++;
354  }
355  }
356  }
357  getline(m_file,line);
358 }
359 
360 
362 
364 {
365  Dictionary& nodes = m_mesh->geometry_fields();
366  m_tmp = Handle<Region>(m_region->create_region("main").handle<Component>());
367 
368  m_global_to_tmp.clear();
369  m_file.seekg(m_elements_cells_position,std::ios::beg);
370 
371  std::map<std::string,Handle< Elements > > elements = create_cells_in_region(*m_tmp,nodes,m_supported_types);
372  std::map<std::string,boost::shared_ptr< Connectivity::Buffer > > buffer = create_connectivity_buffermap(elements);
373 
374  // skip next line
375  std::string line;
376  getline(m_file,line);
377 
378  // read every line and store the connectivity in the correct region through the buffer
379  std::string etype_CF;
380  std::vector<Uint> cf_element;
381  Uint neu_node_number;
382  Uint cf_node_number;
383  Uint cf_idx;
384  Uint table_idx;
385 
386  for (Uint i=0; i<m_headerData.NELEM; ++i)
387  {
388  if (m_headerData.NELEM > 100000)
389  {
390  if(i%(m_headerData.NELEM/20)==0)
391  CFinfo << 100*i/m_headerData.NELEM << "% " << CFendl;
392  }
393 
394  // element description
395  Uint elementNumber, elementType, nbElementNodes;
396  m_file >> elementNumber >> elementType >> nbElementNodes;
397 
398  if(!m_supported_neu_types.count(elementType))
399  throw common::NotSupported(FromHere(), "Failed to read neutral file: unsupported element type " + common::to_str(elementType));
400 
401  // get element nodes
402  if (m_hash->subhash(ELEMS).owns(i))
403  {
404  cf_element.resize(nbElementNodes);
405  for (Uint j=0; j<nbElementNodes; ++j)
406  {
407  cf_idx = m_nodes_neu_to_cf[elementType][j];
408  m_file >> neu_node_number;
409  cf3_assert(m_neu_node_to_coord_idx.count(neu_node_number));
410  cf_node_number = m_neu_node_to_coord_idx[neu_node_number];
411  cf3_assert(cf_node_number < nodes.size());
412  cf_element[cf_idx] = cf_node_number;
413  }
414  etype_CF = element_type(elementType,nbElementNodes);
415  table_idx = buffer[etype_CF]->add_row(cf_element);
416  m_global_to_tmp[elementNumber] = std::make_pair(elements[etype_CF],table_idx);
417  }
418  else
419  {
420  for (Uint j=0; j<nbElementNodes; ++j)
421  {
422  m_file >> neu_node_number;
423  }
424  }
425 
426  // finish the line
427  getline(m_file,line);
428  }
429  getline(m_file,line); // ENDOFSECTION
430 
431  m_neu_node_to_coord_idx.clear();
432 
433 }
434 
436 
438 {
439  Dictionary& nodes = m_mesh->geometry_fields();
441 
442  std::vector<GroupData> groups(m_headerData.NGRPS);
443  std::string line;
444  int dummy;
445 
446  std::set<Uint>::const_iterator it;
447 
448  for (Uint g=0; g<m_headerData.NGRPS; ++g)
449  {
450  m_file.seekg(m_element_group_positions[g],std::ios::beg);
451 
452  std::string ELMMAT;
453  Uint NGP, NELGP, MTYP, NFLAGS, I;
454  getline(m_file,line); // ELEMENT GROUP...
455  m_file >> line >> NGP >> line >> NELGP >> line >> MTYP >> line >> NFLAGS >> ELMMAT;
456  groups[g].NGP = NGP;
457  groups[g].NELGP = NELGP;
458  groups[g].MTYP = MTYP;
459  groups[g].NFLAGS = NFLAGS;
460  groups[g].ELMMAT = ELMMAT;
461  //groups[g].print();
462 
463  for (Uint i=0; i<NFLAGS; ++i)
464  m_file >> dummy;
465 
466 
467  // 2 cases:
468  // 1) there is only one group --> The tmp region can just be renamed
469  // and put in the filesystem as subcomponent of "mesh/regions"
470  if (m_headerData.NGRPS == 1)
471  {
472  m_tmp->rename(groups[0].ELMMAT);
473  m_tmp.reset();
474  return;
475  }
476 
477  // 2) there are multiple groups --> New regions have to be created
478  // and the elements from the tmp region have to be distributed among
479  // these new regions.
480 
481  // Read first to see howmany elements to allocate
482  int p = m_file.tellg();
483  Uint nb_elems_in_group = 0;
484  for (Uint i=0; i<NELGP; ++i)
485  {
486  m_file >> I;
487  if (m_hash->subhash(ELEMS).owns(I-1))
488  nb_elems_in_group++;
489  }
490  // now allocate and read again
491  groups[g].ELEM.reserve(nb_elems_in_group);
492  m_file.seekg(p,std::ios::beg);
493  for (Uint i=0; i<NELGP; ++i)
494  {
495  m_file >> I;
496  if (m_hash->subhash(ELEMS).owns(I-1))
497  groups[g].ELEM.push_back(I); // set element index
498  }
499 
500  getline(m_file,line); // finish the line (read new line)
501  getline(m_file,line); // ENDOFSECTION
502  }
503 
504  // Create Region for each group
505  boost_foreach(GroupData& group, groups)
506  {
507 
508  Region& region = m_region->create_region(group.ELMMAT);
509 
510  //CFinfo << "region " << region.uri().string() << " created" << CFendl;
511  // Create regions for each element type in each group-region
512  std::map<std::string,Handle< Elements > > elements = create_cells_in_region(region,nodes,m_supported_types);
513  std::map<std::string,boost::shared_ptr< Connectivity::Buffer > > buffer = create_connectivity_buffermap(elements);
514 
515  // Copy elements from tmp_region in the correct region
516  boost_foreach(Uint global_element, group.ELEM)
517  {
518  Handle< Elements > tmp_elems = m_global_to_tmp[global_element].first;
519  Uint local_element = m_global_to_tmp[global_element].second;
520  std::string etype = tmp_elems->element_type().derived_type_name();
521 
522  Uint idx = buffer[etype]->add_row(tmp_elems->geometry_space().connectivity().array()[local_element]);
523  std::string new_elems_name = tmp_elems->name();
524  m_global_to_tmp[global_element] = std::make_pair(Handle<Elements>(region.get_child(new_elems_name)),idx);
525  }
526  }
527 
528  m_region->remove_component(m_tmp->name());
529  m_tmp.reset();
530 
531 }
532 
534 
536 {
538 
539  std::string line;
540  for (Uint t=0; t<m_headerData.NBSETS; ++t) {
541 
542  m_file.seekg(m_boundary_condition_positions[t],std::ios::beg);
543 
544  std::string NAME;
545  int ITYPE, NENTRY, NVALUES, IBCODE1, IBCODE2, IBCODE3, IBCODE4, IBCODE5;
546 
547  // read header
548  getline(m_file,line); // BOUNDARY CONDITIONS...
549  getline(m_file,line); // header
550  std::stringstream ss(line);
551  ss >> NAME >> ITYPE >> NENTRY >> NVALUES >> IBCODE1 >> IBCODE2 >> IBCODE3 >> IBCODE4 >> IBCODE5;
552  if (ITYPE!=1) {
553  throw common::NotSupported(FromHere(),"error: supports only boundary condition data 1 (element/cell): page C-11 of user's guide");
554  }
555  if (IBCODE1!=6) {
556  throw common::NotSupported(FromHere(),"error: supports only IBCODE1 6 (ELEMENT_SIDE)");
557  }
558 
559  Region& bc_region = m_region->create_region(NAME);
560  Dictionary& nodes = m_mesh->geometry_fields();
561 
562  // create all kind of element type regions
563  std::map<std::string,Handle< Elements > > elements = create_faces_in_region (bc_region,nodes,m_supported_types);
564  std::map<std::string,boost::shared_ptr< Connectivity::Buffer > > buffer = create_connectivity_buffermap (elements);
565 
566  // read boundary elements connectivity
567  for (int i=0; i<NENTRY; ++i)
568  {
569  int ELEM, ETYPE, FACE;
570  m_file >> ELEM >> ETYPE >> FACE;
571 
572  Uint global_element = ELEM;
573 
574  std::map<Uint,Region_TableIndex_pair>::iterator it = m_global_to_tmp.find(global_element);
575  if (it != m_global_to_tmp.end())
576  {
577  Handle< Elements > tmp_elements = it->second.first;
578  Uint local_element = it->second.second;
579 
580  //Uint elementType = ETYPE;
581  Uint faceIdx = m_faces_neu_to_cf[ETYPE][FACE];
582 
583  const ElementType& etype = tmp_elements->element_type();
584  const ElementType::FaceConnectivity& face_connectivity = etype.faces();
585 
586  // make a row of nodes
587  const Connectivity::Row& elem_nodes = tmp_elements->geometry_space().connectivity()[local_element];
588  std::vector<Uint> row;
589  row.reserve(face_connectivity.stride[faceIdx]);
590  boost_foreach(const Uint& node, face_connectivity.nodes_range(faceIdx))
591  {
592  cf3_assert(node < nodes.size());
593  row.push_back(elem_nodes[node]);
594  }
595 
596  // add the row to the buffer of the face region
597  std::string face_type = etype.face_type(faceIdx).derived_type_name();
598  cf3_assert_desc(to_str(row.size())+"!="+to_str(buffer[face_type]->get_appointed().shape()[1]),row.size() == buffer[face_type]->get_appointed().shape()[1]);
599  buffer[face_type]->add_row(row);
600  }
601  getline(m_file,line); // finish the line (read new line)
602  }
603  getline(m_file,line); // ENDOFSECTION
604 
605  }
606 }
607 
609 
610 std::string Reader::element_type(const Uint neu_type, const Uint nb_nodes)
611 {
612  std::string cf_type;
613  std::string dim = to_str<int>(m_headerData.NDFCD);
614  if (neu_type==LINE && nb_nodes==2) cf_type = "cf3.mesh.LagrangeP1.Line" + dim + "D"; // line
615  else if (neu_type==QUAD && nb_nodes==4) cf_type = "cf3.mesh.LagrangeP1.Quad" + dim + "D"; // quadrilateral
616  else if (neu_type==TRIAG && nb_nodes==3) cf_type = "cf3.mesh.LagrangeP1.Triag" + dim + "D"; // triangle
617  else if (neu_type==HEXA && nb_nodes==8) cf_type = "cf3.mesh.LagrangeP1.Hexa" + dim + "D"; // hexahedron
618  else if (neu_type==TETRA && nb_nodes==4) cf_type = "cf3.mesh.LagrangeP1.Tetra" + dim + "D"; // tetrahedron
619  else if (neu_type==5 && nb_nodes==6) cf_type = "cf3.mesh.LagrangeP1.Prism3D"; // wedge (prism)
621  else if (neu_type==7 && nb_nodes==5) // pyramid
622  throw common::NotImplemented(FromHere(),"pyramid element not able to convert to COOLFluiD yet.");
623  else {
624  throw common::NotSupported(FromHere(),"no support for element type/nodes "
625  + to_str<int>(neu_type) + "/" + to_str<int>(nb_nodes) +
626  " in neutral format");
627  }
628 
629  return cf_type;
630 }
631 
633 
634 } // neu
635 } // mesh
636 } // cf3
std::set< Uint > m_supported_neu_types
Definition: Shared.hpp:51
#define CFinfo
these are always defined
Definition: Log.hpp:104
std::string name(ComponentWrapper &self)
std::vector< Uint > m_element_group_positions
Definition: Reader.hpp:89
void resize(const Uint new_size)
Definition: List.hpp:69
Helper class to create the Builder and place it in the factory.
Definition: Builder.hpp:212
Handle< MergedParallelDistribution > m_hash
Definition: Reader.hpp:74
Handle< Region > m_region
Definition: Reader.hpp:81
void remove_empty_element_regions(Region &parent_region)
Definition: MeshReader.cpp:199
virtual std::string derived_type_name() const =0
std::string path() const
Definition: URI.cpp:253
#define cf3_assert(a)
Definition: Assertions.hpp:93
common::List< Uint > & rank()
Return the rank of every field row.
Definition: Dictionary.hpp:90
Reader(const std::string &name)
constructor
Definition: Reader.cpp:49
#define boost_foreach
lowercase version of BOOST_FOREACH
Definition: Foreach.hpp:16
const Field & coordinates() const
Definition: Dictionary.cpp:481
common::List< Uint > & rank()
Definition: Entities.hpp:71
std::vector< std::vector< Uint > > m_nodes_neu_to_cf
Definition: Shared.hpp:49
Common_API std::string to_str< int >(const int &v)
#define CFendl
Definition: Log.hpp:109
boost::filesystem::fstream m_file
Definition: Reader.hpp:79
Conversions from and to std::string.
Real e()
Definition of the Unit charge [C].
Definition: Consts.hpp:30
boost::proto::terminal< SFOp< NodesOp > >::type const nodes
virtual const FaceConnectivity & faces() const =0
Common_API std::string to_str(const T &v)
Converts to std::string.
virtual void do_read_mesh_into(const common::URI &fp, Mesh &mesh)
Definition: Reader.cpp:90
std::vector< Uint > m_boundary_condition_positions
Definition: Reader.hpp:90
std::map< std::string, Handle< Elements > > create_faces_in_region(Region &parent_region, Dictionary &nodes, const std::vector< std::string > &etypes)
Definition: MeshReader.cpp:166
std::map< std::string, Handle< Elements > > create_cells_in_region(Region &parent_region, Dictionary &nodes, const std::vector< std::string > &etypes)
Definition: MeshReader.cpp:146
Uint size() const
return the number of elements
Definition: Entities.cpp:161
std::map< Uint, Uint > m_neu_node_to_coord_idx
Definition: Reader.hpp:85
std::vector< Uint > ELEM
Definition: Reader.hpp:114
#define cf3_assert_desc(m, a)
Definition: Assertions.hpp:94
PropertyList & properties()
Definition: Component.cpp:842
std::map< Uint, Region_TableIndex_pair > m_global_to_tmp
Definition: Reader.hpp:77
Handle< Region > m_tmp
Definition: Reader.hpp:82
static const char * dimension()
Tag for options related to the dimension of something.
Definition: Tags.cpp:14
Handle< Component > get_child(const std::string &name)
Definition: Component.cpp:441
virtual std::vector< std::string > get_extensions()
Definition: Reader.cpp:81
Top-level namespace for coolfluid.
Definition: Action.cpp:18
const TYPE value(const std::string &opt_name) const
Get the value of the option with given name.
Definition: OptionList.hpp:104
common::List< Uint > & glb_idx()
Return the global index of every field row.
Definition: Dictionary.hpp:84
struct cf3::mesh::neu::Reader::HeaderData m_headerData
Handle< Mesh > m_mesh
Definition: Reader.hpp:80
Uint m_nodal_coordinates_position
Definition: Reader.hpp:87
Stores connectivity information about the faces that form the cell boundary.
void raise_mesh_loaded()
Definition: Mesh.cpp:479
TableRow< Uint >::type Row
the type of a row in the internal structure of the table
Definition: Table.hpp:56
LoadBalance::LoadBalance(const std::string &name) std::string desc
Definition: LoadBalance.cpp:35
std::vector< std::vector< Uint > > m_faces_neu_to_cf
Definition: Shared.hpp:47
static boost::proto::terminal< ExpressionGroupTag >::type group
Use group(expr1, expr2, ..., exprN) to evaluate a group of expressions.
std::set< Uint > m_ghost_nodes
Definition: Reader.hpp:84
unsigned int Uint
typedef for unsigned int
Definition: CF.hpp:90
virtual const ElementType & face_type(const Uint face) const =0
void resize(const Uint size)
Resize the contained fields.
Definition: Dictionary.cpp:106
std::map< std::string, boost::shared_ptr< common::Table< Uint >::Buffer > > create_connectivity_buffermap(std::map< std::string, Handle< Elements > > &elems_map)
Definition: MeshReader.cpp:186
RangeT nodes_range(const Uint face) const
Iterator range over the nodes of the given face.
Handle< Component > handle()
Get a handle to the component.
Definition: Component.hpp:179
std::vector< Uint > stride
Number of nodes for each face.
std::string element_type(const Uint neu_type, const Uint nb_nodes)
Definition: Reader.cpp:610
OptionList & options()
Definition: Component.cpp:856
SelectOptionType< T >::type & add(const std::string &name, const T &default_value=T())
Definition: OptionList.hpp:45
Base class for defining CF components.
Definition: Component.hpp:82
Uint size() const
Number of rows of contained fields.
Definition: Dictionary.cpp:99
Uint m_elements_cells_position
Definition: Reader.hpp:88
std::vector< std::string > m_supported_types
Definition: Shared.hpp:45
cf3::common::ComponentBuilder< neu::Reader, MeshReader, LibNeu > aneuReader_Builder
Definition: Reader.cpp:45
#define FromHere()
Send comments to:
COOLFluiD Web Admin