Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Conditions.cpp
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // File: BoundaryConditions.cpp
4 //
5 // For more information, please see: http://www.nektar.info/
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10 // Department of Aeronautics, Imperial College London (UK), and Scientific
11 // Computing and Imaging Institute, University of Utah (USA).
12 //
13 // License for the specific language governing rights and limitations under
14 // Permission is hereby granted, free of charge, to any person obtaining a
15 // copy of this software and associated documentation files (the "Software"),
16 // to deal in the Software without restriction, including without limitation
17 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
18 // and/or sell copies of the Software, and to permit persons to whom the
19 // Software is furnished to do so, subject to the following conditions:
20 //
21 // The above copyright notice and this permission notice shall be included
22 // in all copies or substantial portions of the Software.
23 //
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
27 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
30 // DEALINGS IN THE SOFTWARE.
31 //
32 // Description:
33 //
34 //
35 ////////////////////////////////////////////////////////////////////////////////
36 
39 #include <tinyxml.h>
40 
41 using namespace std;
42 
43 namespace Nektar
44 {
45  namespace SpatialDomains
46  {
47  /**
48  * Constructor - collective on the session's communicator.
49  */
50  BoundaryConditions::BoundaryConditions(
52  const MeshGraphSharedPtr &meshGraph) :
53  m_meshGraph(meshGraph), m_session(pSession)
54 
55  {
56  Read(m_session->GetElement("Nektar/Conditions"));
57  }
58 
60  {
61  }
62 
64  {
65  }
66 
67  /**
68  * Helper that turns a set into an array.
69  */
70  Array<OneD, int> ToArray(const std::set<int>& set)
71  {
72  Array<OneD, int> ans(set.size());
73  std::set<int>::const_iterator it = set.begin(), end = set.end();
74  for (int i = 0; it != end; ++it, ++i)
75  {
76  ans[i] = *it;
77  }
78  return ans;
79  }
80 
81  /*
82  * Helper function that effectively does an MPI_Allreduce for the
83  * sets of boundary region IDs.
84  *
85  * Can't actually use an MPI_Allreduce because the sizes of the input
86  * sets and output set are (in general) different.
87  *
88  * Instead, use a simple binary tree reduction and two MPI_Bcast calls.
89  */
90  std::set<int> ShareAllBoundaryIDs(
91  const BoundaryRegionCollection& boundaryRegions,
93  {
94  // Turn the keys of boundaryRegions into set.
95  std::set<int> ids;
96  BoundaryRegionCollection::const_iterator it =
97  boundaryRegions.begin(), end = boundaryRegions.end();
98  int i = 0;
99  for (; it != end; ++it, ++i)
100  ids.insert(it->first);
101 
102  int np = comm->GetSize();
103  int ip = comm->GetRank();
104 
105  int half_size = 1;
106  bool involved = true;
107  while (involved && half_size < np)
108  {
109  if (ip & half_size)
110  {
111  // I'm sender
112 
113  // The receiver rank
114  int receiver = ip - half_size;
115 
116  Array<OneD, int> idsArray = ToArray(ids);
117  // Send my size (to alloc the reciever array)
118  Array<OneD, int> sender_size(1);
119  sender_size[0] = idsArray.num_elements();
120  comm->Send(receiver, sender_size);
121 
122  // Send my data
123  comm->Send(receiver, idsArray);
124 
125  // Once we've sent, we're no longer involved.
126  involved = false;
127  }
128  else
129  {
130  // I'm receiver
131 
132  // The sender rank
133  int sender = ip + half_size;
134 
135  if (sender < np)
136  {
137  // Receive the size
138  Array<OneD, int> sender_size(1);
139  comm->Recv(sender, sender_size);
140 
141  // Receive the data
142  Array<OneD, int> other_ids(sender_size[0]);
143  comm->Recv(sender, other_ids);
144 
145  // Merge
146  ids.insert(other_ids.begin(), other_ids.end());
147  }
148  }
149  half_size *= 2;
150  }
151 
152  // Bcast the size
153  int nIds;
154  if (ip == 0)
155  nIds = ids.size();
156 
157  comm->Bcast(nIds, 0);
158 
159  // Bcast the data
160  Array<OneD, int> idsArray;
161  if (ip == 0)
162  idsArray = ToArray(ids);
163  else
164  idsArray = Array<OneD, int>(nIds);
165 
166  comm->Bcast(idsArray, 0);
167 
168  return std::set<int>(idsArray.begin(), idsArray.end());
169  }
170 
171  /**
172  * Create a new communicator for each boundary region.
173  * Collective on the session's communicator.
174  */
176  {
177  LibUtilities::CommSharedPtr comm = m_session->GetComm();
178 
179  std::set<int> allids = ShareAllBoundaryIDs(m_boundaryRegions, comm);
180 
181  std::set<int>::const_iterator it = allids.begin(), end =
182  allids.end();
183  for (; it != end; ++it)
184  {
186  m_boundaryRegions.find(*it);
187  int this_rank_participates = (reg_it != m_boundaryRegions.end());
188  LibUtilities::CommSharedPtr comm_region = comm->CommCreateIf(
189  this_rank_participates);
190 
191  ASSERTL0(bool(comm_region) == bool(this_rank_participates),
192  "Rank should be in communicator but wasn't or is in "
193  "communicator but shouldn't be.");
194 
195  if (this_rank_participates)
196  {
197  m_boundaryCommunicators[reg_it->first] = comm_region;
198  }
199  }
200  }
201 
202  /**
203  * Collective on the session's communicator.
204  */
205  void BoundaryConditions::Read(TiXmlElement *conditions)
206  {
207  ASSERTL0(conditions, "Unable to find CONDITIONS tag in file.");
208 
209  TiXmlElement *boundaryRegions = conditions->FirstChildElement(
210  "BOUNDARYREGIONS");
211 
212  if (boundaryRegions)
213  {
214  ReadBoundaryRegions(conditions);
216  ReadBoundaryConditions(conditions);
217  }
218  }
219 
220  /**
221  *
222  */
223  void BoundaryConditions::ReadBoundaryRegions(TiXmlElement *conditions)
224  {
225  // ensure boundary regions only read once per class definition
226  if (m_boundaryRegions.size() != 0)
227  {
228  return;
229  }
230 
231  TiXmlElement *boundaryRegions = conditions->FirstChildElement(
232  "BOUNDARYREGIONS");
233  ASSERTL0(boundaryRegions, "Unable to find BOUNDARYREGIONS block.");
234 
235  // See if we have boundary regions defined.
236  TiXmlElement *boundaryRegionsElement =
237  boundaryRegions->FirstChildElement("B");
238 
239  while (boundaryRegionsElement)
240  {
241  /// All elements are of the form: "<B ID="#"> ... </B>", with
242  /// ? being the element type.
243  int indx;
244  int err = boundaryRegionsElement->QueryIntAttribute("ID",
245  &indx);
246  ASSERTL0(err == TIXML_SUCCESS, "Unable to read attribute ID.");
247 
248  TiXmlNode* boundaryRegionChild =
249  boundaryRegionsElement->FirstChild();
250  // This is primarily to skip comments that may be present.
251  // Comments appear as nodes just like elements.
252  // We are specifically looking for text in the body
253  // of the definition.
254  while (boundaryRegionChild
255  && boundaryRegionChild->Type()
256  != TiXmlNode::TINYXML_TEXT)
257  {
258  boundaryRegionChild = boundaryRegionChild->NextSibling();
259  }
260 
261  ASSERTL0(boundaryRegionChild,
262  "Unable to read variable definition body.");
263  std::string boundaryRegionStr =
264  boundaryRegionChild->ToText()->ValueStr();
265 
266  std::string::size_type indxBeg =
267  boundaryRegionStr.find_first_of('[') + 1;
268  std::string::size_type indxEnd = boundaryRegionStr.find_last_of(
269  ']') - 1;
270 
271  ASSERTL0(indxBeg <= indxEnd,
272  (std::string(
273  "Error reading boundary region definition:")
274  + boundaryRegionStr).c_str());
275 
276  std::string indxStr = boundaryRegionStr.substr(indxBeg,
277  indxEnd - indxBeg + 1);
278 
279  if (!indxStr.empty())
280  {
281  // Extract the composites from the string and return them in a list.
282  BoundaryRegionShPtr boundaryRegion(
284 
285  ASSERTL0(m_boundaryRegions.count(indx) == 0,
286  "Boundary region " + indxStr + " defined more than "
287  "once!");
288 
289  m_meshGraph->GetCompositeList(indxStr, *boundaryRegion);
290  m_boundaryRegions[indx] = boundaryRegion;
291  }
292 
293  boundaryRegionsElement =
294  boundaryRegionsElement->NextSiblingElement("B");
295  }
296  }
297 
298  /**
299  *
300  */
302  TiXmlElement *conditions)
303  {
304  // Protect against multiple reads.
305  if (m_boundaryConditions.size() != 0)
306  {
307  return;
308  }
309 
310  // Read REGION tags
311  TiXmlElement *boundaryConditionsElement =
312  conditions->FirstChildElement("BOUNDARYCONDITIONS");
313  ASSERTL0(boundaryConditionsElement,
314  "Boundary conditions must be specified.");
315 
316  TiXmlElement *regionElement =
317  boundaryConditionsElement->FirstChildElement("REGION");
318 
319  // Read R (Robin), D (Dirichlet), N (Neumann), P (Periodic) C(Cauchy) tags
320  while (regionElement)
321  {
322  BoundaryConditionMapShPtr boundaryConditions = MemoryManager<
323  BoundaryConditionMap>::AllocateSharedPtr();
324 
325  int boundaryRegionID;
326  int err = regionElement->QueryIntAttribute("REF",
327  &boundaryRegionID);
328  ASSERTL0(err == TIXML_SUCCESS,
329  "Error reading boundary region reference.");
330 
331  ASSERTL0(m_boundaryConditions.count(boundaryRegionID) == 0,
332  "Boundary region '" + boost::lexical_cast < std::string
333  > (boundaryRegionID)
334  + "' appears multiple times.");
335 
336  // Find the boundary region corresponding to this ID.
337  std::string boundaryRegionIDStr;
338  std::ostringstream boundaryRegionIDStrm(boundaryRegionIDStr);
339  boundaryRegionIDStrm << boundaryRegionID;
340 
341  ASSERTL0(m_boundaryRegions.count(boundaryRegionID) == 1,
342  "Boundary region " + boost::lexical_cast < string
343  > (boundaryRegionID) + " not found");
344 
345  // Find the communicator that belongs to this ID
346  LibUtilities::CommSharedPtr boundaryRegionComm =
347  m_boundaryCommunicators[boundaryRegionID];
348 
349  TiXmlElement *conditionElement =
350  regionElement->FirstChildElement();
351  std::vector < std::string > vars = m_session->GetVariables();
352 
353  while (conditionElement)
354  {
355  // Check type.
356  std::string conditionType = conditionElement->Value();
357  std::string attrData;
358  bool isTimeDependent = false;
359 
360  // All have var specified, or else all variables are zero.
361  TiXmlAttribute *attr = conditionElement->FirstAttribute();
362 
364  std::string attrName;
365 
366  attrData = conditionElement->Attribute("VAR");
367 
368  if (!attrData.empty())
369  {
370  iter = std::find(vars.begin(), vars.end(), attrData);
371  ASSERTL0(iter != vars.end(),
372  (std::string("Cannot find variable: ")
373  + attrData).c_str());
374  }
375 
376  if (conditionType == "N")
377  {
378  if (attrData.empty())
379  {
380  // All variables are Neumann and are set to zero.
382  vars.begin(); varIter != vars.end();
383  ++varIter)
384  {
385  BoundaryConditionShPtr neumannCondition(
387  m_session, "00.0"));
388  (*boundaryConditions)[*varIter] =
389  neumannCondition;
390  }
391  }
392  else
393  {
394  // Use the iterator from above, which must point to the variable.
395  attr = attr->Next();
396 
397  if (attr)
398  {
399  std::string equation, userDefined, filename;
400 
401  while (attr)
402  {
403 
404  attrName = attr->Name();
405 
406  if (attrName == "USERDEFINEDTYPE")
407  {
408  // Do stuff for the user defined attribute
409  attrData = attr->Value();
410  ASSERTL0(!attrData.empty(),
411  "USERDEFINEDTYPE attribute must have associated value.");
412 
413  // Suppose to go here?
414  m_session->SubstituteExpressions(
415  attrData);
416 
417  userDefined = attrData;
418  isTimeDependent = boost::iequals(attrData,"TimeDependent");
419  }
420  else if (attrName == "VALUE")
421  {
422  ASSERTL0(attrName == "VALUE",
423  (std::string(
424  "Unknown attribute: ")
425  + attrName).c_str());
426 
427  attrData = attr->Value();
428  ASSERTL0(!attrData.empty(),
429  "VALUE attribute must be specified.");
430 
431  m_session->SubstituteExpressions(
432  attrData);
433 
434  equation = attrData;
435  }
436  else if (attrName == "FILE")
437  {
438  ASSERTL0(attrName == "FILE",
439  (std::string(
440  "Unknown attribute: ")
441  + attrName).c_str());
442 
443  attrData = attr->Value();
444  ASSERTL0(!attrData.empty(),
445  "FILE attribute must be specified.");
446 
447  m_session->SubstituteExpressions(
448  attrData);
449 
450  filename = attrData;
451  }
452  else
453  {
454  ASSERTL0(false,
455  (std::string("Unknown boundary condition attribute: ") + attrName).c_str());
456  }
457  attr = attr->Next();
458  }
459 
460  BoundaryConditionShPtr neumannCondition(
462  m_session, equation,
463  userDefined, filename,
464  boundaryRegionComm));
465  neumannCondition->SetIsTimeDependent(isTimeDependent);
466  (*boundaryConditions)[*iter] = neumannCondition;
467  }
468  else
469  {
470  // This variable's condition is zero.
471  BoundaryConditionShPtr neumannCondition(
473  m_session, "0"));
474  (*boundaryConditions)[*iter] = neumannCondition;
475  }
476  }
477  }
478  else if (conditionType == "D")
479  {
480  if (attrData.empty())
481  {
482  // All variables are Dirichlet and are set to zero.
484  vars.begin(); varIter != vars.end();
485  ++varIter)
486  {
487  BoundaryConditionShPtr dirichletCondition(
489  m_session, "0"));
490  (*boundaryConditions)[*varIter] =
491  dirichletCondition;
492  }
493  }
494  else
495  {
496  // Use the iterator from above, which must point to the variable.
497  attr = attr->Next();
498 
499  if (attr)
500  {
501  std::string equation, userDefined, filename;
502 
503  while (attr)
504  {
505 
506  attrName = attr->Name();
507 
508  if (attrName == "USERDEFINEDTYPE")
509  {
510 
511  // Do stuff for the user defined attribute
512  attrData = attr->Value();
513  ASSERTL0(!attrData.empty(),
514  "USERDEFINEDTYPE attribute must have associated value.");
515 
516  m_session->SubstituteExpressions(
517  attrData);
518 
519  userDefined = attrData;
520  isTimeDependent = boost::iequals(attrData,"TimeDependent");
521  }
522  else if (attrName == "VALUE")
523  {
524  ASSERTL0(attrName == "VALUE",
525  (std::string(
526  "Unknown attribute: ")
527  + attrName).c_str());
528 
529  attrData = attr->Value();
530  ASSERTL0(!attrData.empty(),
531  "VALUE attribute must have associated value.");
532 
533  m_session->SubstituteExpressions(
534  attrData);
535 
536  equation = attrData;
537  }
538  else if (attrName == "FILE")
539  {
540  ASSERTL0(attrName == "FILE",
541  (std::string(
542  "Unknown attribute: ")
543  + attrName).c_str());
544 
545  attrData = attr->Value();
546  ASSERTL0(!attrData.empty(),
547  "FILE attribute must be specified.");
548 
549  m_session->SubstituteExpressions(
550  attrData);
551 
552  filename = attrData;
553  }
554  else
555  {
556  ASSERTL0(false,
557  (std::string("Unknown boundary condition attribute: ") + attrName).c_str());
558  }
559  attr = attr->Next();
560  }
561 
562  BoundaryConditionShPtr dirichletCondition(
564  m_session, equation,
565  userDefined, filename,
566  boundaryRegionComm));
567  dirichletCondition->SetIsTimeDependent(isTimeDependent);
568  (*boundaryConditions)[*iter] =
569  dirichletCondition;
570  }
571  else
572  {
573  // This variable's condition is zero.
574  BoundaryConditionShPtr dirichletCondition(
576  m_session, "0"));
577  (*boundaryConditions)[*iter] =
578  dirichletCondition;
579  }
580  }
581  }
582  else if (conditionType == "R") // Read du/dn + PRIMCOEFF u = VALUE
583  {
584  if (attrData.empty())
585  {
586  // All variables are Robin and are set to zero.
588  vars.begin(); varIter != vars.end();
589  ++varIter)
590  {
591  BoundaryConditionShPtr robinCondition(
593  m_session, "0", "0"));
594  (*boundaryConditions)[*varIter] =
595  robinCondition;
596  }
597  }
598  else
599  {
600  // Use the iterator from above, which must
601  // point to the variable. Read the A and
602  // B attributes.
603  attr = attr->Next();
604 
605  if (attr)
606  {
607  std::string attrName1;
608  std::string attrData1;
609  std::string equation1, equation2, userDefined;
610  std::string filename;
611 
612  bool primcoeffset = false;
613 
614  while(attr){
615 
616  attrName1 = attr->Name();
617 
618  if (attrName1=="USERDEFINEDTYPE") {
619 
620  // Do stuff for the user defined attribute
621  attrData1 = attr->Value();
622  ASSERTL0(!attrData1.empty(), "USERDEFINEDTYPE attribute must have associated value.");
623 
624  m_session->SubstituteExpressions(attrData1);
625  userDefined = attrData1;
626  isTimeDependent = boost::iequals(attrData,"TimeDependent");
627  }
628  else if(attrName1 == "VALUE"){
629 
630  attrData1 = attr->Value();
631  ASSERTL0(!attrData1.empty(), "VALUE attributes must have associated values.");
632 
633  m_session->SubstituteExpressions(attrData1);
634 
635  equation1 = attrData1;
636  }
637  else if(attrName1 == "PRIMCOEFF")
638  {
639 
640  attrData1 = attr->Value();
641  ASSERTL0(!attrData1.empty(), "PRIMCOEFF attributes must have associated values.");
642 
643  m_session->SubstituteExpressions(attrData1);
644 
645  equation2 = attrData1;
646 
647  primcoeffset = true;
648  }
649  else if(attrName1=="FILE")
650  {
651  attrData1 = attr->Value();
652  ASSERTL0(!attrData1.empty(), "FILE attribute must be specified.");
653 
654  m_session->SubstituteExpressions(attrData1);
655 
656  filename = attrData1;
657  }
658  else
659  {
660  ASSERTL0(false, (std::string("Unknown boundary condition attribute: ") + attrName1).c_str());
661 
662  }
663  attr = attr->Next();
664  }
665 
666  if(primcoeffset == false)
667  {
668  ASSERTL0(false,"PRIMCOEFF must be specified in a Robin boundary condition");
669  }
670  BoundaryConditionShPtr robinCondition(
672  m_session, equation1, equation2,
673  userDefined, filename,
674  boundaryRegionComm));
675  (*boundaryConditions)[*iter] = robinCondition;
676  }
677  else
678  {
679  // This variable's condition is zero.
680  BoundaryConditionShPtr robinCondition(
682  m_session, "0", "0"));
683  robinCondition->SetIsTimeDependent(isTimeDependent);
684  (*boundaryConditions)[*iter] = robinCondition;
685  }
686  }
687  }
688  else if (conditionType == "P")
689  {
690  if (attrData.empty())
691  {
692  attr = attr->Next();
693 
694  if (attr)
695  {
696  attrName = attr->Name();
697 
698  ASSERTL0(attrName == "VALUE",
699  (std::string("Unknown attribute: ")
700  + attrName).c_str());
701 
702  attrData = attr->Value();
703  ASSERTL0(!attrData.empty(),
704  "VALUE attribute must have associated value.");
705 
706  int beg = attrData.find_first_of("[");
707  int end = attrData.find_first_of("]");
708  std::string periodicBndRegionIndexStr =
709  attrData.substr(beg + 1, end - beg - 1);
710  ASSERTL0(beg < end,
711  (std::string(
712  "Error reading periodic boundary region definition for boundary region: ")
713  + boundaryRegionIDStrm.str()).c_str());
714 
715  vector<unsigned int> periodicBndRegionIndex;
716  bool parseGood = ParseUtils::GenerateSeqVector(
717  periodicBndRegionIndexStr.c_str(),
718  periodicBndRegionIndex);
719 
720  ASSERTL0(
721  parseGood
722  && (periodicBndRegionIndex.size()
723  == 1),
724  (std::string(
725  "Unable to read periodic boundary condition for boundary region: ")
726  + boundaryRegionIDStrm.str()).c_str());
727 
728  BoundaryConditionShPtr periodicCondition(
730  periodicBndRegionIndex[0]));
731 
733  vars.begin(); varIter != vars.end();
734  ++varIter)
735  {
736  (*boundaryConditions)[*varIter] =
737  periodicCondition;
738  }
739  }
740  else
741  {
742  ASSERTL0(false,
743  "Periodic boundary conditions should be explicitely defined");
744  }
745  }
746  else
747  {
748  // Use the iterator from above, which must point to the variable.
749  // Read the VALUE attribute. It is the next and only other attribute.
750  attr = attr->Next();
751 
752  if (attr)
753  {
754  attrName = attr->Name();
755 
756  ASSERTL0(attrName == "VALUE",
757  (std::string("Unknown attribute: ")
758  + attrName).c_str());
759 
760  attrData = attr->Value();
761  ASSERTL0(!attrData.empty(),
762  "VALUE attribute must have associated value.");
763 
764  int beg = attrData.find_first_of("[");
765  int end = attrData.find_first_of("]");
766  std::string periodicBndRegionIndexStr =
767  attrData.substr(beg + 1, end - beg - 1);
768  ASSERTL0(beg < end,
769  (std::string(
770  "Error reading periodic boundary "
771  "region definition for boundary "
772  "region: ")
773  + boundaryRegionIDStrm.str())
774  .c_str());
775 
776  vector<unsigned int> periodicBndRegionIndex;
777  bool parseGood = ParseUtils::GenerateSeqVector(
778  periodicBndRegionIndexStr.c_str(),
779  periodicBndRegionIndex);
780 
781  ASSERTL0(parseGood &&
782  periodicBndRegionIndex.size() == 1,
783  (std::string(
784  "Unable to read periodic boundary "
785  "condition for boundary region: "
786  + boundaryRegionIDStrm.str()))
787  .c_str());
788 
789  BoundaryConditionShPtr periodicCondition(
791  periodicBndRegionIndex[0]));
792  (*boundaryConditions)[*iter] =
793  periodicCondition;
794  }
795  else
796  {
797  ASSERTL0(false,
798  "Periodic boundary conditions should be explicitely defined");
799  }
800  }
801  }
802  else if (conditionType == "C")
803  {
804  ASSERTL0(false, "Cauchy type boundary conditions not "
805  "implemented.");
806  }
807 
808  conditionElement = conditionElement->NextSiblingElement();
809  }
810 
811  m_boundaryConditions[boundaryRegionID] = boundaryConditions;
812  regionElement = regionElement->NextSiblingElement("REGION");
813  }
814  }
815  }
816 }
#define ASSERTL0(condition, msg)
Definition: ErrorUtil.hpp:198
BoundaryRegionCollection m_boundaryRegions
Definition: Conditions.h:269
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
STL namespace.
std::map< int, LibUtilities::CommSharedPtr > m_boundaryCommunicators
Definition: Conditions.h:271
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
Definition: MeshPartition.h:51
static bool GenerateSeqVector(const char *const str, std::vector< unsigned int > &vec)
Definition: ParseUtils.hpp:79
boost::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
Definition: Comm.h:55
Array< OneD, int > ToArray(const std::set< int > &set)
Definition: Conditions.cpp:70
std::map< int, BoundaryRegionShPtr > BoundaryRegionCollection
Definition: Conditions.h:217
std::set< int > ShareAllBoundaryIDs(const BoundaryRegionCollection &boundaryRegions, LibUtilities::CommSharedPtr comm)
Definition: Conditions.cpp:90
std::map< std::string, BoundaryConditionShPtr > BoundaryConditionMap
Definition: Conditions.h:224
StandardMatrixTag boost::call_traits< LhsDataType >::const_reference rhs typedef NekMatrix< LhsDataType, StandardMatrixTag >::iterator iterator
void ReadBoundaryRegions(TiXmlElement *regions)
Definition: Conditions.cpp:223
void Read(TiXmlElement *conditions)
Read segments (and general MeshGraph) given TiXmlDocument.
Definition: Conditions.cpp:205
boost::shared_ptr< BoundaryConditionMap > BoundaryConditionMapShPtr
Definition: Conditions.h:225
LibUtilities::SessionReaderSharedPtr m_session
Definition: Conditions.h:267
BoundaryConditionCollection m_boundaryConditions
Definition: Conditions.h:270
MeshGraphSharedPtr m_meshGraph
The mesh graph to use for referencing geometry info.
Definition: Conditions.h:266
InputIterator find(InputIterator first, InputIterator last, InputIterator startingpoint, const EqualityComparable &value)
Definition: StdRegions.hpp:316
boost::shared_ptr< BoundaryConditionBase > BoundaryConditionShPtr
Definition: Conditions.h:219
void ReadBoundaryConditions(TiXmlElement *conditions)
Definition: Conditions.cpp:301
boost::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:442
boost::shared_ptr< BoundaryRegion > BoundaryRegionShPtr
Definition: Conditions.h:215