Nektar++
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | List of all members
Nektar::Utilities::InputMCF Class Reference

#include <InputMCF.h>

Inheritance diagram for Nektar::Utilities::InputMCF:
[legend]

Public Member Functions

 InputMCF (NekMeshUtils::MeshSharedPtr m)
 Set up InputCAD object. More...
 
virtual ~InputMCF ()
 
virtual void Process ()
 
void ParseFile (std::string nm)
 
- Public Member Functions inherited from Nektar::NekMeshUtils::InputModule
NEKMESHUTILS_EXPORT InputModule (MeshSharedPtr p_m)
 
NEKMESHUTILS_EXPORT void OpenStream ()
 Open a file for input. More...
 
- Public Member Functions inherited from Nektar::NekMeshUtils::Module
NEKMESHUTILS_EXPORT Module (MeshSharedPtr p_m)
 
NEKMESHUTILS_EXPORT void RegisterConfig (std::string key, std::string value=std::string())
 Register a configuration option with a module. More...
 
NEKMESHUTILS_EXPORT void PrintConfig ()
 Print out all configuration options for a module. More...
 
NEKMESHUTILS_EXPORT void SetDefaults ()
 Sets default configuration options for those which have not been set. More...
 
NEKMESHUTILS_EXPORT MeshSharedPtr GetMesh ()
 
virtual NEKMESHUTILS_EXPORT void ProcessVertices ()
 Extract element vertices. More...
 
virtual NEKMESHUTILS_EXPORT void ProcessEdges (bool ReprocessEdges=true)
 Extract element edges. More...
 
virtual NEKMESHUTILS_EXPORT void ProcessFaces (bool ReprocessFaces=true)
 Extract element faces. More...
 
virtual NEKMESHUTILS_EXPORT void ProcessElements ()
 Generate element IDs. More...
 
virtual NEKMESHUTILS_EXPORT void ProcessComposites ()
 Generate composites. More...
 
virtual NEKMESHUTILS_EXPORT void ClearElementLinks ()
 

Static Public Member Functions

static NekMeshUtils::ModuleSharedPtr create (NekMeshUtils::MeshSharedPtr m)
 Creates an instance of this class. More...
 

Static Public Attributes

static NekMeshUtils::ModuleKey className
 ModuleKey for class. More...
 

Private Attributes

std::string m_minDelta
 
std::string m_maxDelta
 
std::string m_eps
 
std::string m_cadfile
 
std::string m_order
 
std::string m_blsurfs
 
std::string m_blthick
 
std::string m_blprog
 
std::string m_bllayers
 
std::string m_refinement
 
std::string m_nacadomain
 
std::string m_periodic
 
std::string m_adjustment
 
std::string m_spaceoutblthr
 
std::string m_nospaceoutsurf
 
bool m_makeBL
 
bool m_surfopti
 
bool m_varopti
 
bool m_refine
 
bool m_woct
 
bool m_2D
 
bool m_splitBL
 
bool m_naca
 
bool m_adjust
 
bool m_adjustall
 
bool m_smoothbl
 
bool m_manifold
 
bool m_cfiMesh
 
bool m_spaceoutbl
 

Additional Inherited Members

- Protected Member Functions inherited from Nektar::NekMeshUtils::InputModule
NEKMESHUTILS_EXPORT void PrintSummary ()
 Print summary of elements. More...
 
- Protected Member Functions inherited from Nektar::NekMeshUtils::Module
NEKMESHUTILS_EXPORT void ReorderPrisms (PerMap &perFaces)
 Reorder node IDs so that prisms and tetrahedra are aligned correctly. More...
 
NEKMESHUTILS_EXPORT void PrismLines (int prism, PerMap &perFaces, std::set< int > &prismsDone, std::vector< ElementSharedPtr > &line)
 
- Protected Attributes inherited from Nektar::NekMeshUtils::InputModule
io::filtering_istream m_mshFile
 Input stream. More...
 
std::ifstream m_mshFileStream
 Input stream. More...
 
- Protected Attributes inherited from Nektar::NekMeshUtils::Module
MeshSharedPtr m_mesh
 Mesh object. More...
 
std::map< std::string, ConfigOptionm_config
 List of configuration values. More...
 

Detailed Description

Definition at line 45 of file InputMCF.h.

Constructor & Destructor Documentation

◆ InputMCF()

Nektar::Utilities::InputMCF::InputMCF ( NekMeshUtils::MeshSharedPtr  m)

Set up InputCAD object.

Definition at line 60 of file InputMCF.cpp.

60  : InputModule(m)
61 {
62 }
NEKMESHUTILS_EXPORT InputModule(MeshSharedPtr p_m)

◆ ~InputMCF()

Nektar::Utilities::InputMCF::~InputMCF ( )
virtual

Definition at line 64 of file InputMCF.cpp.

65 {
66 }

Member Function Documentation

◆ create()

static NekMeshUtils::ModuleSharedPtr Nektar::Utilities::InputMCF::create ( NekMeshUtils::MeshSharedPtr  m)
inlinestatic

Creates an instance of this class.

Definition at line 53 of file InputMCF.h.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr().

54  {
56  }
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.

◆ ParseFile()

void Nektar::Utilities::InputMCF::ParseFile ( std::string  nm)

Definition at line 68 of file InputMCF.cpp.

References ASSERTL0, Nektar::LibUtilities::SessionReader::CreateInstance(), L, m_2D, m_adjust, m_adjustall, m_adjustment, m_bllayers, m_blprog, m_blsurfs, m_blthick, m_cadfile, m_cfiMesh, m_eps, m_makeBL, m_manifold, m_maxDelta, Nektar::NekMeshUtils::Module::m_mesh, m_minDelta, m_naca, m_nacadomain, m_nospaceoutsurf, m_order, m_periodic, m_refine, m_refinement, m_smoothbl, m_spaceoutbl, m_spaceoutblthr, m_splitBL, m_surfopti, m_varopti, m_woct, and class_topology::P.

Referenced by Process().

69 {
70  vector<string> filename;
71  filename.push_back(nm);
72 
73  char *prgname = (char*)"NekMesh";
75  LibUtilities::SessionReader::CreateInstance(1, &prgname, filename);
76  pSession->InitSession();
77 
78  auto comm = pSession->GetComm();
79  if (comm->GetType().find("MPI") != std::string::npos)
80  {
81  m_mesh->m_comm = comm;
82  }
83 
84  ASSERTL0(pSession->DefinesElement("NEKTAR/MESHING"), "no meshing tag");
85  ASSERTL0(pSession->DefinesElement("NEKTAR/MESHING/INFORMATION"),
86  "no information tag");
87  ASSERTL0(pSession->DefinesElement("NEKTAR/MESHING/PARAMETERS"),
88  "no parameters tag");
89 
90  TiXmlElement *mcf = pSession->GetElement("NEKTAR/MESHING");
91 
92  // Save MESHING tag as provenance information.
93  std::stringstream ss;
94  ss << *mcf;
95  m_mesh->m_metadata["XML_NekMeshMCF"] = ss.str();
96 
97  TiXmlElement *info = mcf->FirstChildElement("INFORMATION");
98  TiXmlElement *I = info->FirstChildElement("I");
99  map<string, string> information;
100  while (I)
101  {
102  string tmp1, tmp2;
103  I->QueryStringAttribute("PROPERTY", &tmp1);
104  I->QueryStringAttribute("VALUE", &tmp2);
105  information[tmp1] = tmp2;
106  I = I->NextSiblingElement("I");
107  }
108 
109  TiXmlElement *param = mcf->FirstChildElement("PARAMETERS");
110  TiXmlElement *P = param->FirstChildElement("P");
111  map<string, string> parameters;
112  while (P)
113  {
114  string tmp1, tmp2;
115  P->QueryStringAttribute("PARAM", &tmp1);
116  P->QueryStringAttribute("VALUE", &tmp2);
117  parameters[tmp1] = tmp2;
118  P = P->NextSiblingElement("P");
119  }
120 
121  set<string> boolparameters;
122 
123  if (pSession->DefinesElement("NEKTAR/MESHING/BOOLPARAMETERS"))
124  {
125  TiXmlElement *bparam = mcf->FirstChildElement("BOOLPARAMETERS");
126  TiXmlElement *BP = bparam->FirstChildElement("P");
127 
128  while (BP)
129  {
130  string tmp;
131  BP->QueryStringAttribute("VALUE", &tmp);
132  boolparameters.insert(tmp);
133  BP = BP->NextSiblingElement("P");
134  }
135  }
136 
137  set<string> refinement;
138  if (pSession->DefinesElement("NEKTAR/MESHING/REFINEMENT"))
139  {
140  TiXmlElement *refine = mcf->FirstChildElement("REFINEMENT");
141  TiXmlElement *L = refine->FirstChildElement("LINE");
142 
143  while (L)
144  {
145  stringstream ss;
146  TiXmlElement *T = L->FirstChildElement("X1");
147  ss << T->GetText() << ",";
148  T = L->FirstChildElement("Y1");
149  ss << T->GetText() << ",";
150  T = L->FirstChildElement("Z1");
151  ss << T->GetText() << ",";
152  T = L->FirstChildElement("X2");
153  ss << T->GetText() << ",";
154  T = L->FirstChildElement("Y2");
155  ss << T->GetText() << ",";
156  T = L->FirstChildElement("Z2");
157  ss << T->GetText() << ",";
158  T = L->FirstChildElement("R");
159  ss << T->GetText() << ",";
160  T = L->FirstChildElement("D");
161  ss << T->GetText();
162 
163  refinement.insert(ss.str());
164 
165  L = L->NextSiblingElement("LINE");
166  }
167  }
168 
169  set<string> periodic;
170  if (pSession->DefinesElement("NEKTAR/MESHING/PERIODIC"))
171  {
172  TiXmlElement *per = mcf->FirstChildElement("PERIODIC");
173  TiXmlElement *pair = per->FirstChildElement("P");
174 
175  while (pair)
176  {
177  string tmp;
178  pair->QueryStringAttribute("PAIR", &tmp);
179  periodic.insert(tmp);
180  pair = pair->NextSiblingElement("P");
181  }
182  }
183 
184  auto it = information.find("CADFile");
185  ASSERTL0(it != information.end(), "no cadfile defined");
186  m_cadfile = it->second;
187 
188  it = information.find("MeshType");
189  ASSERTL0(it != information.end(), "no meshtype defined");
190 
191  m_cfiMesh = it->second == "CFI";
192  m_makeBL = it->second == "3DBndLayer";
193  m_2D = it->second == "2D";
194  m_manifold = it->second == "Manifold";
195 
196  if (it->second == "2DBndLayer")
197  {
198  m_makeBL = true;
199  m_2D = true;
200  }
201 
202  if (!m_makeBL && !m_2D && !m_manifold && !m_cfiMesh)
203  {
204  ASSERTL0(it->second == "3D", "unsure on MeshType")
205  }
206 
207  it = parameters.find("MinDelta");
208  ASSERTL0(it != parameters.end(), "no mindelta defined");
209  m_minDelta = it->second;
210 
211  it = parameters.find("MaxDelta");
212  ASSERTL0(it != parameters.end(), "no maxdelta defined");
213  m_maxDelta = it->second;
214 
215  it = parameters.find("EPS");
216  ASSERTL0(it != parameters.end(), "no eps defined");
217  m_eps = it->second;
218 
219  it = parameters.find("Order");
220  ASSERTL0(it != parameters.end(), "no order defined");
221  m_order = it->second;
222 
223  if (m_makeBL)
224  {
225  it = parameters.find("BndLayerSurfaces");
226  ASSERTL0(it != parameters.end(), "no BndLayersurfs defined");
227  m_blsurfs = it->second;
228 
229  it = parameters.find("BndLayerThickness");
230  ASSERTL0(it != parameters.end(), "no BndLayerthick defined");
231  m_blthick = it->second;
232 
233  it = parameters.find("BndLayerLayers");
234  m_splitBL = it != parameters.end();
235  if (m_splitBL)
236  {
237  m_bllayers = it->second;
238  it = parameters.find("BndLayerProgression");
239  m_blprog = it != parameters.end() ? it->second : "2.0";
240  }
241 
242  it = parameters.find("BndLayerAdjustment");
243  if (it != parameters.end())
244  {
245  m_adjust = true;
246  m_adjustment = it->second;
247  }
248  else
249  {
250  m_adjust = false;
251  }
252 
253  it = parameters.find("SpaceOutBndLayer");
254  if (it != parameters.end())
255  {
256  m_spaceoutbl = true;
257  m_spaceoutblthr = it->second;
258 
259  it = parameters.find("NoSpaceOutSurf");
260  if (it != parameters.end())
261  {
262  m_nospaceoutsurf = it->second;
263  }
264  }
265  else
266  {
267  m_spaceoutbl = false;
268  }
269  }
270  else
271  {
272  m_splitBL = false;
273  }
274 
275  m_naca = false;
276  if (m_2D && m_cadfile.find('.') == std::string::npos)
277  {
278  m_naca = true;
279 
280  stringstream ss;
281  it = parameters.find("Xmin");
282  ASSERTL0(it != parameters.end(), "no xmin defined");
283  ss << it->second << ",";
284  it = parameters.find("Ymin");
285  ASSERTL0(it != parameters.end(), "no ymin defined");
286  ss << it->second << ",";
287  it = parameters.find("Xmax");
288  ASSERTL0(it != parameters.end(), "no xmax defined");
289  ss << it->second << ",";
290  it = parameters.find("Ymax");
291  ASSERTL0(it != parameters.end(), "no zmax defined");
292  ss << it->second << ",";
293  it = parameters.find("AOA");
294  ASSERTL0(it != parameters.end(), "no aoa defined");
295  ss << it->second;
296 
297  m_nacadomain = ss.str();
298  }
299 
300  auto sit = boolparameters.find("SurfaceOptimiser");
301  m_surfopti = sit != boolparameters.end();
302  sit = boolparameters.find("WriteOctree");
303  m_woct = sit != boolparameters.end();
304  sit = boolparameters.find("VariationalOptimiser");
305  m_varopti = sit != boolparameters.end();
306  sit = boolparameters.find("BndLayerAdjustEverywhere");
307  m_adjustall = sit != boolparameters.end();
308  sit = boolparameters.find("SmoothBndLayer");
309  m_smoothbl = sit != boolparameters.end();
310 
311  m_refine = refinement.size() > 0;
312  if (m_refine)
313  {
314  stringstream ss;
315  for (sit = refinement.begin(); sit != refinement.end(); sit++)
316  {
317  ss << *sit;
318  ss << ":";
319  }
320  m_refinement = ss.str();
321  m_refinement.erase(m_refinement.end() - 1);
322  }
323 
324  if (periodic.size() > 0)
325  {
326  stringstream ss;
327  for (sit = periodic.begin(); sit != periodic.end(); ++sit)
328  {
329  ss << *sit;
330  ss << ":";
331  }
332  m_periodic = ss.str();
333  m_periodic.erase(m_periodic.end() - 1);
334  }
335 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:216
std::string m_spaceoutblthr
Definition: InputMCF.h:63
std::string m_adjustment
Definition: InputMCF.h:63
static SessionReaderSharedPtr CreateInstance(int argc, char *argv[])
Creates an instance of the SessionReader class.
std::string m_nacadomain
Definition: InputMCF.h:63
NekDouble L
std::string m_refinement
Definition: InputMCF.h:63
std::string m_nospaceoutsurf
Definition: InputMCF.h:63
std::shared_ptr< SessionReader > SessionReaderSharedPtr

◆ Process()

void Nektar::Utilities::InputMCF::Process ( )
virtual

Implements Nektar::NekMeshUtils::Module.

Definition at line 337 of file InputMCF.cpp.

References Nektar::LibUtilities::NekFactory< tKey, tBase, tParam >::CreateInstance(), Nektar::FieldUtils::eProcessModule, Nektar::FieldUtils::GetModuleFactory(), m_2D, m_adjust, m_adjustall, m_adjustment, m_bllayers, m_blprog, m_blsurfs, m_blthick, m_cadfile, m_cfiMesh, Nektar::NekMeshUtils::Module::m_config, m_eps, m_makeBL, m_manifold, m_maxDelta, Nektar::NekMeshUtils::Module::m_mesh, m_minDelta, m_naca, m_nacadomain, m_nospaceoutsurf, m_order, m_periodic, m_refine, m_refinement, m_smoothbl, m_spaceoutbl, m_spaceoutblthr, m_splitBL, m_surfopti, m_varopti, m_woct, CellMLToNektar.pycml::name, ParseFile(), Nektar::NekMeshUtils::Module::ProcessComposites(), Nektar::NekMeshUtils::Module::ProcessEdges(), Nektar::NekMeshUtils::Module::ProcessElements(), Nektar::NekMeshUtils::Module::ProcessFaces(), and Nektar::NekMeshUtils::Module::ProcessVertices().

338 {
339  ParseFile(m_config["infile"].as<string>());
340 
341  m_mesh->m_expDim = 3;
342  m_mesh->m_spaceDim = 3;
343  m_mesh->m_nummode = boost::lexical_cast<int>(m_order) + 1;
344 
345  ModuleSharedPtr module;
346 
347  ////**** CAD ****////
348  module = GetModuleFactory().CreateInstance(
349  ModuleKey(eProcessModule, "loadcad"), m_mesh);
350  module->RegisterConfig("filename", m_cadfile);
351  if (m_mesh->m_verbose)
352  {
353  module->RegisterConfig("verbose", "");
354  }
355  if (m_2D)
356  {
357  module->RegisterConfig("2D", "");
358  }
359  if (m_naca)
360  {
361  module->RegisterConfig("NACA", m_nacadomain);
362  }
363 
364  if (m_cfiMesh)
365  {
366  module->RegisterConfig("CFIMesh", "");
367  }
368 
369  module->SetDefaults();
370  module->Process();
371 
372  if (!m_cfiMesh)
373  {
374  ////**** OCTREE ****////
375  module = GetModuleFactory().CreateInstance(
376  ModuleKey(eProcessModule, "loadoctree"), m_mesh);
377  module->RegisterConfig("mindel", m_minDelta);
378  module->RegisterConfig("maxdel", m_maxDelta);
379  module->RegisterConfig("eps", m_eps);
380  if (m_refine)
381  {
382  module->RegisterConfig("refinement", m_refinement);
383  }
384  if (m_woct)
385  {
386  module->RegisterConfig("writeoctree", "");
387  }
388 
389  module->SetDefaults();
390  module->Process();
391  }
392 
393  ////**** LINEAR MESHING ****////
394  if (m_2D)
395  {
396  ////**** 2DGenerator ****////
397  m_mesh->m_expDim = 2;
398  m_mesh->m_spaceDim = 2;
399  module = GetModuleFactory().CreateInstance(
400  ModuleKey(eProcessModule, "2dgenerator"), m_mesh);
401  if (m_makeBL)
402  {
403  module->RegisterConfig("blcurves", m_blsurfs);
404  module->RegisterConfig("blthick", m_blthick);
405 
406  if (m_adjust)
407  {
408  module->RegisterConfig("bltadjust", m_adjustment);
409 
410  if (m_adjustall)
411  {
412  module->RegisterConfig("adjustblteverywhere", "");
413  }
414  }
415 
416  if (m_smoothbl)
417  {
418  module->RegisterConfig("smoothbl", "");
419  }
420 
421  if (m_spaceoutbl)
422  {
423  module->RegisterConfig("spaceoutbl", m_spaceoutblthr);
424  module->RegisterConfig("nospaceoutsurf", m_nospaceoutsurf);
425  }
426  }
427  if (m_periodic.size())
428  {
429  module->RegisterConfig("periodic", m_periodic);
430  }
431 
432  try
433  {
434  module->SetDefaults();
435  module->Process();
436  }
437  catch (runtime_error &e)
438  {
439  cout << "2D linear mesh generator failed with message:" << endl;
440  cout << e.what() << endl;
441  cout << "No mesh file has been created" << endl;
442  abort();
443  }
444  }
445  else
446  {
447  ////**** Possible Mesh Sources ****////
448  if (m_cfiMesh)
449  {
450  ////**** CFI mesh ****////
451  module = GetModuleFactory().CreateInstance(
452  ModuleKey(eProcessModule, "cfimesh"), m_mesh);
453 
454  module->SetDefaults();
455  module->Process();
456  }
457  else
458  {
459  ////**** SurfaceMesh ****////
460  module = GetModuleFactory().CreateInstance(
461  ModuleKey(eProcessModule, "surfacemesh"), m_mesh);
462 
463  try
464  {
465  module->SetDefaults();
466  module->Process();
467  }
468  catch (runtime_error &e)
469  {
470  cout << "Surface meshing has failed with message:" << endl;
471  cout << e.what() << endl;
472  cout << "Any surfaces which were succsessfully meshed will be "
473  "dumped as a manifold mesh"
474  << endl;
475  m_mesh->m_expDim = 2;
476  ProcessVertices();
477  ProcessEdges();
478  ProcessFaces();
479  ProcessElements();
481  return;
482  }
483 
484  if (m_manifold)
485  {
486  // dont want to volume mesh
487  m_mesh->m_expDim = 2;
488  }
489  else
490  {
491  ////**** VolumeMesh ****////
492  module = GetModuleFactory().CreateInstance(
493  ModuleKey(eProcessModule, "volumemesh"), m_mesh);
494  if (m_makeBL)
495  {
496  module->RegisterConfig("blsurfs", m_blsurfs);
497  module->RegisterConfig("blthick", m_blthick);
498  module->RegisterConfig("bllayers", m_bllayers);
499  module->RegisterConfig("blprog", m_blprog);
500  }
501 
502  try
503  {
504  module->SetDefaults();
505  module->Process();
506  }
507  catch (runtime_error &e)
508  {
509  cout << "Volume meshing has failed with message:" << endl;
510  cout << e.what() << endl;
511  cout << "The linear surface mesh be dumped as a manifold "
512  "mesh"
513  << endl;
514  m_mesh->m_expDim = 2;
515  m_mesh->m_element[3].clear();
516  ProcessVertices();
517  ProcessEdges();
518  ProcessFaces();
519  ProcessElements();
521  return;
522  }
523  }
524  }
525  }
526 
527  ////**** HOSurface ****////
528  module = GetModuleFactory().CreateInstance(
529  ModuleKey(eProcessModule, "hosurface"), m_mesh);
530  if (m_surfopti)
531  {
532  module->RegisterConfig("opti", "");
533  }
534 
535  try
536  {
537  module->SetDefaults();
538  module->Process();
539  }
540  catch (runtime_error &e)
541  {
542  cout << "High-order surface meshing has failed with message:" << endl;
543  cout << e.what() << endl;
544  cout << "The mesh will be written as normal but the incomplete surface "
545  "will remain faceted"
546  << endl;
547  return;
548  }
549 
550  ////*** VARIATIONAL OPTIMISATION ****////
551  if (m_varopti)
552  {
553  unsigned int np = boost::thread::physical_concurrency();
554  if (m_mesh->m_verbose)
555  {
556  cout << "Detecting 4 cores, will attempt to run in parrallel"
557  << endl;
558  }
559  module = GetModuleFactory().CreateInstance(
560  ModuleKey(eProcessModule, "varopti"), m_mesh);
561  module->RegisterConfig("hyperelastic", "");
562  module->RegisterConfig("maxiter", "10");
563  module->RegisterConfig("numthreads", boost::lexical_cast<string>(np));
564 
565  try
566  {
567  module->SetDefaults();
568  module->Process();
569  }
570  catch (runtime_error &e)
571  {
572  cout << "Variational optimisation has failed with message:" << endl;
573  cout << e.what() << endl;
574  cout << "The mesh will be written as is, it may be invalid" << endl;
575  return;
576  }
577  }
578 
579  ////**** SPLIT BL ****////
580  if (m_splitBL)
581  {
582  module = GetModuleFactory().CreateInstance(
584  module->RegisterConfig("layers", m_bllayers);
585  module->RegisterConfig("surf", m_blsurfs);
586  module->RegisterConfig("nq",
587  boost::lexical_cast<string>(m_mesh->m_nummode));
588  module->RegisterConfig("r", m_blprog);
589 
590  try
591  {
592  module->SetDefaults();
593  module->Process();
594  }
595  catch (runtime_error &e)
596  {
597  cout << "Boundary layer splitting has failed with message:" << endl;
598  cout << e.what() << endl;
599  cout << "The mesh will be written as is, it may be invalid" << endl;
600  return;
601  }
602  }
603 
604  // apply surface labels
605  for (auto &it : m_mesh->m_composite)
606  {
607  ElementSharedPtr el = it.second->m_items[0];
608  if (el->m_parentCAD)
609  {
610  string name = el->m_parentCAD->GetName();
611  if (name.size() > 0)
612  {
613  m_mesh->m_faceLabels.insert(
614  make_pair(el->GetTagList()[0], name));
615  }
616  }
617  }
619 
620  ////**** Peralign ****////
621  if (m_2D && m_periodic.size())
622  {
623  vector<string> lines;
624  boost::split(lines, m_periodic, boost::is_any_of(":"));
625 
626  for (auto &il : lines)
627  {
628  module = GetModuleFactory().CreateInstance(
629  ModuleKey(eProcessModule, "peralign"), m_mesh);
630 
631  vector<string> tmp(2);
632  boost::split(tmp, il, boost::is_any_of(","));
633  module->RegisterConfig("surf1", tmp[0]);
634  module->RegisterConfig("surf2", tmp[1]);
635 
636  module->SetDefaults();
637  module->Process();
638  }
639  }
640 }
std::string m_spaceoutblthr
Definition: InputMCF.h:63
std::shared_ptr< Module > ModuleSharedPtr
std::string m_adjustment
Definition: InputMCF.h:63
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
Definition: NekFactory.hpp:144
std::pair< ModuleType, std::string > ModuleKey
virtual NEKMESHUTILS_EXPORT void ProcessFaces(bool ReprocessFaces=true)
Extract element faces.
std::string m_nacadomain
Definition: InputMCF.h:63
std::shared_ptr< Element > ElementSharedPtr
Definition: Edge.h:49
virtual NEKMESHUTILS_EXPORT void ProcessElements()
Generate element IDs.
void ParseFile(std::string nm)
Definition: InputMCF.cpp:68
std::map< std::string, ConfigOption > m_config
List of configuration values.
virtual NEKMESHUTILS_EXPORT void ProcessVertices()
Extract element vertices.
virtual NEKMESHUTILS_EXPORT void ProcessEdges(bool ReprocessEdges=true)
Extract element edges.
std::string m_refinement
Definition: InputMCF.h:63
std::string m_nospaceoutsurf
Definition: InputMCF.h:63
virtual NEKMESHUTILS_EXPORT void ProcessComposites()
Generate composites.
ModuleFactory & GetModuleFactory()

Member Data Documentation

◆ className

ModuleKey Nektar::Utilities::InputMCF::className
static
Initial value:
"Reads mesh configuration and will generate the mesh file.")

ModuleKey for class.

Definition at line 58 of file InputMCF.h.

◆ m_2D

bool Nektar::Utilities::InputMCF::m_2D
private

Definition at line 67 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_adjust

bool Nektar::Utilities::InputMCF::m_adjust
private

Definition at line 67 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_adjustall

bool Nektar::Utilities::InputMCF::m_adjustall
private

Definition at line 67 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_adjustment

std::string Nektar::Utilities::InputMCF::m_adjustment
private

Definition at line 63 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_bllayers

std::string Nektar::Utilities::InputMCF::m_bllayers
private

Definition at line 63 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_blprog

std::string Nektar::Utilities::InputMCF::m_blprog
private

Definition at line 63 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_blsurfs

std::string Nektar::Utilities::InputMCF::m_blsurfs
private

Definition at line 63 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_blthick

std::string Nektar::Utilities::InputMCF::m_blthick
private

Definition at line 63 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_cadfile

std::string Nektar::Utilities::InputMCF::m_cadfile
private

Definition at line 63 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_cfiMesh

bool Nektar::Utilities::InputMCF::m_cfiMesh
private

Definition at line 67 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_eps

std::string Nektar::Utilities::InputMCF::m_eps
private

Definition at line 63 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_makeBL

bool Nektar::Utilities::InputMCF::m_makeBL
private

Definition at line 67 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_manifold

bool Nektar::Utilities::InputMCF::m_manifold
private

Definition at line 67 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_maxDelta

std::string Nektar::Utilities::InputMCF::m_maxDelta
private

Definition at line 63 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_minDelta

std::string Nektar::Utilities::InputMCF::m_minDelta
private

Definition at line 63 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_naca

bool Nektar::Utilities::InputMCF::m_naca
private

Definition at line 67 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_nacadomain

std::string Nektar::Utilities::InputMCF::m_nacadomain
private

Definition at line 63 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_nospaceoutsurf

std::string Nektar::Utilities::InputMCF::m_nospaceoutsurf
private

Definition at line 63 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_order

std::string Nektar::Utilities::InputMCF::m_order
private

Definition at line 63 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_periodic

std::string Nektar::Utilities::InputMCF::m_periodic
private

Definition at line 63 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_refine

bool Nektar::Utilities::InputMCF::m_refine
private

Definition at line 67 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_refinement

std::string Nektar::Utilities::InputMCF::m_refinement
private

Definition at line 63 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_smoothbl

bool Nektar::Utilities::InputMCF::m_smoothbl
private

Definition at line 67 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_spaceoutbl

bool Nektar::Utilities::InputMCF::m_spaceoutbl
private

Definition at line 67 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_spaceoutblthr

std::string Nektar::Utilities::InputMCF::m_spaceoutblthr
private

Definition at line 63 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_splitBL

bool Nektar::Utilities::InputMCF::m_splitBL
private

Definition at line 67 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_surfopti

bool Nektar::Utilities::InputMCF::m_surfopti
private

Definition at line 67 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_varopti

bool Nektar::Utilities::InputMCF::m_varopti
private

Definition at line 67 of file InputMCF.h.

Referenced by ParseFile(), and Process().

◆ m_woct

bool Nektar::Utilities::InputMCF::m_woct
private

Definition at line 67 of file InputMCF.h.

Referenced by ParseFile(), and Process().