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