KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
generate_new_conditions_mesher_for_fluids_process.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosFluidDynamicsApplication $
3 // Created by: $Author: AFranci $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: September 2018 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_GENERATE_NEW_CONDITIONS_MESHER_FOR_FLUIDS_PROCESS_H_INCLUDED)
11 #define KRATOS_GENERATE_NEW_CONDITIONS_MESHER_FOR_FLUIDS_PROCESS_H_INCLUDED
12 
13 // System includes
14 
15 // External includes
16 
17 // Project includes
19 
21 //Data: MASTER_ELEMENTS(set), MASTER_NODES(set)
22 //StepData:
23 //Flags: (checked) TO_ERASE, TO_REFINE, CONTACT, NEW_ENTITY
24 // (set) BOUNDARY(set), [TO_REFINE(nodes), TO_ERASE(condition)]->locally to not preserve condition
25 // (modified)
26 // (reset)
27 // (set):=(set in this process)
28 
29 namespace Kratos
30 {
31 
34 
41 
42 typedef GlobalPointersVector<Node> NodeWeakPtrVectorType;
43 typedef GlobalPointersVector<Element> ElementWeakPtrVectorType;
47 
51 
55 
57 
61 {
62 public:
65 
68 
72 
75  MesherUtilities::MeshingParameters &rRemeshingParameters,
76  int EchoLevel)
77  : BuildModelPartBoundaryProcess(rModelPart, rModelPart.Name(), EchoLevel),
78  mrRemesh(rRemeshingParameters)
79  {
80  }
81 
84  {
85  }
86 
90 
91  void operator()()
92  {
93  Execute();
94  }
95 
99 
100  void Execute() override
101  {
102  KRATOS_TRY
103 
104  bool success = false;
105 
106  // double begin_time = OpenMPUtils::GetCurrentTime();
107 
108  if (mEchoLevel > 0)
109  std::cout << " [ Build Boundary on ModelPart [" << mrModelPart.Name() << "] ]" << std::endl;
110 
111  success = UniqueSkinSearch(mrModelPart);
112 
113  if (!success)
114  {
115  std::cout << " ERROR: BOUNDARY BUILD FAILED ModelPart : [" << mrModelPart << "] " << std::endl;
116  }
117  // else
118  // {
119  // if (mEchoLevel >= 1)
120  // {
121  // double end_time = OpenMPUtils::GetCurrentTime();
122  // std::cout << " [ Search performed in Time = " << end_time - begin_time << " ]" << std::endl;
123  // }
124  // //PrintSkin(mrModelPart);
125  // }
126 
127  KRATOS_CATCH(" ")
128  }
129 
133 
137 
141 
143  std::string Info() const override
144  {
145  return "GenerateNewConditionsMesherForFluidsProcess";
146  }
147 
149  void PrintInfo(std::ostream &rOStream) const override
150  {
151  rOStream << "GenerateNewConditionsMesherForFluidsProcess";
152  }
153 
155  void PrintData(std::ostream &rOStream) const override
156  {
157  }
158 
162 
164 
165 protected:
168 
172 
176 
177  //**************************************************************************
178  //**************************************************************************
179 
180  bool UniqueSkinSearch(ModelPart &rModelPart)
181  {
182 
183  KRATOS_TRY
184 
185  if (mEchoLevel > 0)
186  {
187  std::cout << " [ Initial Conditions : " << rModelPart.Conditions().size() << std::endl;
188  }
189 
190  if (!rModelPart.Elements().size() || (rModelPart.Is(ACTIVE)))
191  {
192  if (mEchoLevel > 0)
193  {
194  std::cout << " [ Final Conditions : " << rModelPart.Conditions().size() << std::endl;
195  }
196  return true;
197  }
198 
199  //check if a remesh process has been performed and there is any node to erase
200  bool any_node_to_erase = false;
201  for (ModelPart::NodesContainerType::const_iterator in = rModelPart.NodesBegin(); in != rModelPart.NodesEnd(); ++in)
202  {
203 
204  in->Reset(BOUNDARY);
205  in->Reset(FREE_SURFACE);
206 
207  if (any_node_to_erase == false)
208  if (in->Is(TO_ERASE))
209  any_node_to_erase = true;
210  }
211 
212  //swap conditions for a temporary use
213  unsigned int ConditionId = 1;
214  ModelPart::ConditionsContainerType TemporaryConditions;
215 
216  //if there are no conditions check main modelpart mesh conditions
217  if (!rModelPart.Conditions().size())
218  {
219 
220  for (ModelPart::ConditionsContainerType::iterator i_cond = rModelPart.GetParentModelPart().ConditionsBegin(); i_cond != rModelPart.GetParentModelPart().ConditionsEnd(); ++i_cond)
221  {
222  TemporaryConditions.push_back(*(i_cond.base()));
223  i_cond->SetId(ConditionId);
224  ConditionId++;
225  }
226  }
227  else
228  {
229 
230  TemporaryConditions.reserve(rModelPart.Conditions().size());
231  TemporaryConditions.swap(rModelPart.Conditions());
232 
233  //set consecutive ids in the mesh conditions
234  if (any_node_to_erase)
235  {
236  for (ModelPart::ConditionsContainerType::iterator i_cond = TemporaryConditions.begin(); i_cond != TemporaryConditions.end(); ++i_cond)
237  {
238  Geometry<Node> &rConditionGeometry = i_cond->GetGeometry();
239  for (unsigned int i = 0; i < rConditionGeometry.size(); i++)
240  {
241  if (rConditionGeometry[i].Is(TO_ERASE))
242  {
243  i_cond->Set(TO_ERASE);
244  break;
245  }
246  }
247 
248  i_cond->SetId(ConditionId);
249  ConditionId++;
250  }
251  }
252  else
253  {
254  for (ModelPart::ConditionsContainerType::iterator i_cond = TemporaryConditions.begin(); i_cond != TemporaryConditions.end(); ++i_cond)
255  {
256 
257  i_cond->SetId(ConditionId);
258  ConditionId++;
259  }
260  }
261  }
262 
263  //control the previous mesh conditions
264  std::vector<int> PreservedConditions(TemporaryConditions.size() + 1);
265  std::fill(PreservedConditions.begin(), PreservedConditions.end(), 0);
266 
267  //build new skin for the Modelpart
268  this->BuildCompositeConditions(rModelPart, TemporaryConditions, PreservedConditions, ConditionId);
269 
270  //add other conditions out of the skin space dimension
271  this->AddOtherConditions(rModelPart, TemporaryConditions, PreservedConditions, ConditionId);
272 
273  return true;
274 
275  KRATOS_CATCH("")
276  }
277 
278  bool BuildCompositeConditions(ModelPart &rModelPart, ModelPart::ConditionsContainerType &rTemporaryConditions, std::vector<int> &rPreservedConditions, unsigned int &rConditionId) override
279  {
280 
281  KRATOS_TRY
282 
283  //master conditions must be deleted and set them again in the build
284  this->ClearMasterEntities(rModelPart, rTemporaryConditions);
285 
286  //properties to be used in the generation
287  int number_properties = rModelPart.GetParentModelPart().NumberOfProperties();
288  Properties::Pointer properties = rModelPart.GetParentModelPart().pGetProperties(number_properties - 1);
289 
290  ProcessInfo &rCurrentProcessInfo = rModelPart.GetProcessInfo();
291 
292  ModelPart::ElementsContainerType::iterator elements_begin = mrModelPart.ElementsBegin();
293  ModelPart::ElementsContainerType::iterator elements_end = mrModelPart.ElementsEnd();
294 
295  //clear nodal boundary flag
296  for (ModelPart::ElementsContainerType::iterator ie = elements_begin; ie != elements_end; ++ie)
297  {
298  Geometry<Node> &rElementGeometry = ie->GetGeometry();
299 
300  for (unsigned int j = 0; j < rElementGeometry.size(); ++j)
301  {
302  rElementGeometry[j].Reset(BOUNDARY);
303  }
304  }
305 
306  rConditionId = 0;
307  for (ModelPart::ElementsContainerType::iterator ie = elements_begin; ie != elements_end; ++ie)
308  {
309 
310  Geometry<Node> &rElementGeometry = ie->GetGeometry();
311 
312  const unsigned int dimension = rElementGeometry.WorkingSpaceDimension();
313 
314  if (rElementGeometry.FacesNumber() >= (dimension + 1))
315  { //3 or 4
316 
317  /*each face is opposite to the corresponding node number so in 2D triangle
318  0 ----- 1 2
319  1 ----- 2 0
320  2 ----- 0 1
321  */
322 
323  /*each face is opposite to the corresponding node number so in 3D tetrahedron
324  0 ----- 1 2 3
325  1 ----- 2 0 3
326  2 ----- 0 1 3
327  3 ----- 0 2 1
328  */
329 
330  //finding boundaries and creating the "skin"
331  //
332  //********************************************************************
333 
334  DenseMatrix<unsigned int> lpofa; //connectivities of points defining faces
335  DenseVector<unsigned int> lnofa; //number of points defining faces
336 
337  ElementWeakPtrVectorType &rE = ie->GetValue(NEIGHBOUR_ELEMENTS);
338 
339  //get matrix nodes in faces
340  rElementGeometry.NodesInFaces(lpofa);
341  rElementGeometry.NumberNodesInFaces(lnofa);
342 
343  //Get the standard ReferenceCondition
344  const Condition &rReferenceCondition = mrRemesh.GetReferenceCondition();
345 
346  //loop on neighbour elements of an element
347  unsigned int iface = 0;
348  for (ElementWeakPtrVectorType::iterator ne = rE.begin(); ne != rE.end(); ++ne)
349  {
350 
351  unsigned int NumberNodesInFace = lnofa[iface];
352 
353  if ((ne)->Id() == ie->Id())
354  {
355 
356  //if no neighbour is present => the face is free surface
357  bool freeSurfaceFace = false;
358  for (unsigned int j = 1; j <= NumberNodesInFace; ++j)
359  {
360  rElementGeometry[lpofa(j, iface)].Set(BOUNDARY);
361  if (rElementGeometry[lpofa(j, iface)].IsNot(RIGID))
362  {
363  freeSurfaceFace = true;
364  }
365  }
366 
367  if (freeSurfaceFace == true)
368  {
369  for (unsigned int j = 1; j <= NumberNodesInFace; j++)
370  {
371  rElementGeometry[lpofa(j, iface)].Set(FREE_SURFACE);
372  }
373  }
374  //Get the correct ReferenceCondition
375  Condition::Pointer pBoundaryCondition;
376  bool condition_found = false;
377  bool point_condition = false;
378 
379  bool inserted = false;
380  for (ModelPart::ConditionsContainerType::iterator ic = rTemporaryConditions.begin(); ic != rTemporaryConditions.end(); ++ic)
381  {
382  Geometry<Node> &rConditionGeometry = ic->GetGeometry();
383 
384  if (ic->IsNot(TO_ERASE))
385  {
386 
387  if (ic->IsNot(CONTACT))
388  {
389 
390  if (ic->Is(NEW_ENTITY))
391  {
392  inserted = false;
393  }
394  else
395  {
396  // remeshing rebuild
397  for (unsigned int i = 0; i < rConditionGeometry.size(); ++i)
398  {
399  if (rConditionGeometry[i].Is(TO_ERASE))
400  {
401  inserted = true;
402  break;
403  }
404  }
405  // remeshing rebuild
406  }
407 
408  if (!inserted)
409  {
410 
411  if (rPreservedConditions[ic->Id() - 1] == 0)
412  {
413 
414  MesherUtilities MesherUtils;
415  condition_found = MesherUtils.FindCondition(rConditionGeometry, rElementGeometry, lpofa, lnofa, iface);
416 
417  if (condition_found)
418  {
419 
420  pBoundaryCondition = (*(ic.base())); //accessing shared_ptr get() to obtain the raw pointer
421  rPreservedConditions[ic->Id() - 1] += 1; //add each time is used
422 
423  if (rConditionGeometry.PointsNumber() == 1)
424  point_condition = true;
425 
426  //break;
427  }
428  }
429  }
430  else
431  {
432 
433  if (rPreservedConditions[ic->Id() - 1] < 2)
434  {
435 
436  condition_found = this->FindNodeInCondition(rConditionGeometry, rElementGeometry, lpofa, lnofa, iface);
437 
438  if (condition_found)
439  {
440 
441  pBoundaryCondition = (*(ic.base())); //accessing shared_ptr get() to obtain the raw pointer
442  rPreservedConditions[ic->Id() - 1] += 1; //add each time is used
443 
444  if (rConditionGeometry.PointsNumber() == 1)
445  point_condition = true;
446 
447  //break;
448  }
449 
450  // std::cout<<" INSERTED COND "<<ic->Id()<<std::endl;
451  }
452  }
453  }
454  else
455  {
456 
457  rPreservedConditions[ic->Id() - 1] += 1; //will not be restored
458  //std::cout<<" Condition Contact "<<ic->Id()<<std::endl;
459  }
460  }
461 
462  if (condition_found == true)
463  {
464  // std::cout<<" Condition Found: "<<ic->Id()<<" ("<<ic->GetGeometry()[0].Id()<<", "<<ic->GetGeometry()[1].Id()<<") == ("<<rGeom[lpofa(1,i)].Id()<<" "<<rGeom[lpofa(2,i)].Id()<<") -> Used : "<<rPreservedConditions[ic->Id()-1]<<" times "<<std::endl;
465  break;
466  }
467  }
468 
469  // Set new conditions: start
470  if (!point_condition)
471  {
472 
473  //1.- create geometry: points array and geometry type
474 
475  Condition::NodesArrayType FaceNodes;
476  Condition::GeometryType::Pointer ConditionVertices;
477 
478  FaceNodes.reserve(NumberNodesInFace);
479 
480  for (unsigned int j = 1; j <= NumberNodesInFace; ++j)
481  {
482  FaceNodes.push_back(rElementGeometry(lpofa(j, iface)));
483  }
484 
485  rConditionId += 1;
486 
487  //Create a condition
488  Condition::Pointer p_cond;
489  if (condition_found)
490  {
491 
492  p_cond = pBoundaryCondition->Clone(rConditionId, FaceNodes);
493 
494  //p_cond->Data() = pBoundaryCondition->Data();
495 
496  //std::cout<<" _IDa_ "<<p_cond->Id()<<" MASTER ELEMENT "<<ie->Id()<<" MASTER NODE "<<rElementGeometry[lpofa(0,iface)].Id()<<" or "<<rElementGeometry[lpofa(NumberNodesInFace,iface)].Id()<<std::endl;
497 
498  ElementWeakPtrVectorType &MasterElements = p_cond->GetValue(MASTER_ELEMENTS);
499  MasterElements.push_back((*(ie.base())));
500  p_cond->SetValue(MASTER_ELEMENTS, MasterElements);
501 
502  //p_cond->GetValue(MASTER_NODES).push_back( rElementGeometry(lpofa(0,i)) );
503  NodeWeakPtrVectorType &MasterNodes = p_cond->GetValue(MASTER_NODES);
504  MasterNodes.push_back(rElementGeometry(lpofa(0, iface)));
505  p_cond->SetValue(MASTER_NODES, MasterNodes);
506  }
507  else
508  {
509 
510  if (mEchoLevel > 1)
511  {
512  std::cout << " NOT FOUND CONDITION :: CREATED-> [" << rConditionId << "] (";
513  std::cout << FaceNodes[0].Id();
514  for (unsigned int f = 1; f < FaceNodes.size(); ++f)
515  std::cout << ", " << FaceNodes[f].Id();
516 
517  std::cout << ")" << std::endl;
518  }
519 
520  // something not implemented in geometry or condition PrintData
521  //std::cout<<" ReferenceCondition "<<rReferenceCondition<<std::endl;
522 
523  p_cond = rReferenceCondition.Create(rConditionId, FaceNodes, properties);
524 
525  //if a condition is created new nodes must be labeled TO_REFINE
526  for (unsigned int j = 0; j < FaceNodes.size(); ++j)
527  {
528  FaceNodes[j].Set(TO_REFINE);
529  }
530 
531  MeshDataTransferUtilities TransferUtilities;
532 
533  TransferUtilities.InitializeBoundaryData(p_cond.get(), *(mrRemesh.Transfer), rCurrentProcessInfo);
534 
535  //std::cout<<" _IDb_ "<<p_cond->Id()<<" MASTER ELEMENT "<<ie->Id()<<" MASTER NODE "<<rElementGeometry[lpofa(0,iface)].Id()<<" or "<<rElementGeometry[lpofa(NumberNodesInFace,iface)].Id()<<std::endl;
536 
537  ElementWeakPtrVectorType &MasterElements = p_cond->GetValue(MASTER_ELEMENTS);
538  MasterElements.push_back((*(ie.base())));
539  p_cond->SetValue(MASTER_ELEMENTS, MasterElements);
540 
541  //p_cond->GetValue(MASTER_NODES).push_back( rElementGeometry(lpofa(0,i)) );
542  NodeWeakPtrVectorType &MasterNodes = p_cond->GetValue(MASTER_NODES);
543  MasterNodes.push_back(rElementGeometry(lpofa(0, iface)));
544  p_cond->SetValue(MASTER_NODES, MasterNodes);
545  }
546 
547  mrModelPart.Conditions().push_back(p_cond);
548  // Set new conditions: end
549 
550  } //end no point condition
551 
552  } //end face condition
553 
554  iface += 1;
555 
556  } //end loop neighbours
557  }
558  // else{
559  // //set nodes to BOUNDARY for elements outside of the working space dimension
560  // for(unsigned int j=0; j<rElementGeometry.size(); ++j)
561  // {
562  // rElementGeometry[j].Set(BOUNDARY);
563  // }
564  // }
565  }
566 
567  return true;
568 
569  KRATOS_CATCH("")
570  }
571 
572  //**************************************************************************
573  //**************************************************************************
574 
575  bool CheckAcceptedCondition(ModelPart &rModelPart, Condition &rCondition) override
576  {
577  KRATOS_TRY
578 
579  bool node_not_preserved = false;
580  bool condition_not_preserved = false;
581 
582  Geometry<Node> &rConditionGeometry = rCondition.GetGeometry();
583 
584  for (unsigned int j = 0; j < rConditionGeometry.size(); ++j)
585  {
586  if (rConditionGeometry[j].Is(TO_ERASE) || rConditionGeometry[j].Is(TO_REFINE))
587  node_not_preserved = true;
588 
589  if (rConditionGeometry[j].Is(ISOLATED) || rConditionGeometry[j].IsNot(BOUNDARY))
590  condition_not_preserved = true;
591  }
592 
593  if (rCondition.Is(TO_ERASE))
594  condition_not_preserved = true;
595 
596  if (rCondition.Is(BOUNDARY)) //flag for composite condition
597  condition_not_preserved = true;
598 
599  if (node_not_preserved == true || condition_not_preserved == true)
600  return false;
601  else
602  return true;
603 
604  KRATOS_CATCH("")
605  }
606 
607  //**************************************************************************
608  //**************************************************************************
609 
610  void AddConditionToModelPart(ModelPart &rModelPart, Condition::Pointer pCondition) override
611  {
612  KRATOS_TRY
613 
614  //rModelPart.AddCondition(pCondition); //if a Local Id corresponds to a Global Id not added
615  rModelPart.Conditions().push_back(pCondition);
616 
617  KRATOS_CATCH("")
618  }
619 
623 
627 
631 
635 
637 
638 private:
641 
645 
647 
651 
655 
656  //**************************************************************************
657  //**************************************************************************
658 
659  bool FindNodeInCondition(Geometry<Node> &rConditionGeometry, Geometry<Node> &rElementGeometry, DenseMatrix<unsigned int> &lpofa, DenseVector<unsigned int> &lnofa, unsigned int &iface)
660  {
661  KRATOS_TRY
662 
663  // not equivalent geometry sizes for boundary conditions:
664  if (rConditionGeometry.size() != lnofa[iface])
665  return false;
666 
667  // line boundary condition:
668  if (lnofa[iface] == 2)
669  {
670  if (rConditionGeometry[0].Id() == rElementGeometry[lpofa(1, iface)].Id() ||
671  rConditionGeometry[1].Id() == rElementGeometry[lpofa(2, iface)].Id() ||
672  rConditionGeometry[0].Id() == rElementGeometry[lpofa(2, iface)].Id() ||
673  rConditionGeometry[1].Id() == rElementGeometry[lpofa(1, iface)].Id())
674  {
675  return true;
676  }
677  else
678  {
679  return false;
680  }
681  }
682 
683  //3D faces:
684  if (lnofa[iface] == 3)
685  {
686  if (rConditionGeometry[0].Id() == rElementGeometry[lpofa(1, iface)].Id() ||
687  rConditionGeometry[1].Id() == rElementGeometry[lpofa(2, iface)].Id() ||
688  rConditionGeometry[2].Id() == rElementGeometry[lpofa(3, iface)].Id() ||
689  rConditionGeometry[0].Id() == rElementGeometry[lpofa(3, iface)].Id() ||
690  rConditionGeometry[1].Id() == rElementGeometry[lpofa(1, iface)].Id() ||
691  rConditionGeometry[2].Id() == rElementGeometry[lpofa(2, iface)].Id() ||
692  rConditionGeometry[0].Id() == rElementGeometry[lpofa(2, iface)].Id() ||
693  rConditionGeometry[1].Id() == rElementGeometry[lpofa(3, iface)].Id() ||
694  rConditionGeometry[2].Id() == rElementGeometry[lpofa(1, iface)].Id())
695  {
696  return true;
697  }
698  else
699  {
700  return false;
701  }
702  }
703 
704  if (lnofa[iface] > 3)
705  {
706  KRATOS_THROW_ERROR(std::logic_error, "Wrong Condition Number of Face Nodes", *this);
707  }
708 
709  return false;
710 
711  KRATOS_CATCH(" ")
712  }
713 
717 
721 
725 
728 
730  //GenerateNewConditionsMesherForFluidsProcess(GenerateNewConditionsMesherForFluidsProcess const& rOther);
731 
733 
734 }; // Class GenerateNewConditionsMesherForFluidsProcess
735 
737 
740 
744 
746 inline std::istream &operator>>(std::istream &rIStream,
748 
750 inline std::ostream &operator<<(std::ostream &rOStream,
752 {
753  rThis.PrintInfo(rOStream);
754  rOStream << std::endl;
755  rThis.PrintData(rOStream);
756 
757  return rOStream;
758 }
760 
761 } // namespace Kratos.
762 
763 #endif // KRATOS_GENERATE_NEW_CONDITIONS_MESHER_FOR_FLUIDS_PROCESS_H_INCLUDED defined
Short class definition.
Definition: build_model_part_boundary_process.hpp:79
bool AddOtherConditions(ModelPart &rModelPart, ModelPart::ConditionsContainerType &rTemporaryConditions, std::vector< int > &rPreservedConditions, unsigned int &rConditionId)
Definition: build_model_part_boundary_process.hpp:1027
int mEchoLevel
Definition: build_model_part_boundary_process.hpp:571
ModelPart & mrModelPart
Definition: build_model_part_boundary_process.hpp:567
bool ClearMasterEntities(ModelPart &rModelPart, ModelPart::ConditionsContainerType &rTemporaryConditions)
Definition: build_model_part_boundary_process.hpp:583
Base class for all Conditions.
Definition: condition.h:59
virtual Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const
It creates a new condition pointer.
Definition: condition.h:205
bool Is(Flags const &rOther) const
Definition: flags.h:274
bool IsNot(Flags const &rOther) const
Definition: flags.h:291
Short class definition.
Definition: generate_new_conditions_mesher_for_fluids_process.hpp:61
void AddConditionToModelPart(ModelPart &rModelPart, Condition::Pointer pCondition) override
Definition: generate_new_conditions_mesher_for_fluids_process.hpp:610
void Execute() override
Execute method is used to execute the Process algorithms.
Definition: generate_new_conditions_mesher_for_fluids_process.hpp:100
bool UniqueSkinSearch(ModelPart &rModelPart)
Definition: generate_new_conditions_mesher_for_fluids_process.hpp:180
virtual ~GenerateNewConditionsMesherForFluidsProcess()
Destructor.
Definition: generate_new_conditions_mesher_for_fluids_process.hpp:83
KRATOS_CLASS_POINTER_DEFINITION(GenerateNewConditionsMesherForFluidsProcess)
Pointer definition of GenerateNewConditionsMesherForFluidsProcess.
bool BuildCompositeConditions(ModelPart &rModelPart, ModelPart::ConditionsContainerType &rTemporaryConditions, std::vector< int > &rPreservedConditions, unsigned int &rConditionId) override
Definition: generate_new_conditions_mesher_for_fluids_process.hpp:278
void operator()()
Definition: generate_new_conditions_mesher_for_fluids_process.hpp:91
bool CheckAcceptedCondition(ModelPart &rModelPart, Condition &rCondition) override
Definition: generate_new_conditions_mesher_for_fluids_process.hpp:575
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: generate_new_conditions_mesher_for_fluids_process.hpp:155
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: generate_new_conditions_mesher_for_fluids_process.hpp:149
GenerateNewConditionsMesherForFluidsProcess(ModelPart &rModelPart, MesherUtilities::MeshingParameters &rRemeshingParameters, int EchoLevel)
Default constructor.
Definition: generate_new_conditions_mesher_for_fluids_process.hpp:74
std::string Info() const override
Turn back information as a string.
Definition: generate_new_conditions_mesher_for_fluids_process.hpp:143
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
Geometry base class.
Definition: geometry.h:71
SizeType PointsNumber() const
Definition: geometry.h:528
void SetId(const IndexType Id)
Sets Id of this Geometry.
Definition: geometry.h:982
SizeType size() const
Definition: geometry.h:518
virtual void NodesInFaces(DenseMatrix< unsigned int > &rNodesInFaces) const
Definition: geometry.h:2195
virtual void NumberNodesInFaces(DenseVector< unsigned int > &rNumberNodesInFaces) const
Definition: geometry.h:2190
virtual SizeType FacesNumber() const
Returns the number of faces of the current geometry.
Definition: geometry.h:2152
SizeType WorkingSpaceDimension() const
Definition: geometry.h:1287
boost::indirect_iterator< typename TContainerType::iterator > iterator
Definition: global_pointers_vector.h:79
void push_back(TPointerType x)
Definition: global_pointers_vector.h:322
iterator begin()
Definition: global_pointers_vector.h:221
iterator end()
Definition: global_pointers_vector.h:229
Definition: amatrix_interface.h:41
Short class definition.
Definition: mesh_data_transfer_utilities.hpp:46
void InitializeBoundaryData(Condition *rCurrentCondition, const TransferParameters &rTransferVariables, const ProcessInfo &rCurrentProcessInfo)
Definition: mesh_data_transfer_utilities.cpp:65
Short class definition.
Definition: mesher_utilities.hpp:49
bool FindCondition(Geometry< Node > &rConditionGeometry, Geometry< Node > &rGeometry, DenseMatrix< unsigned int > &lpofa, DenseVector< unsigned int > &lnofa, unsigned int &iface)
Definition: mesher_utilities.cpp:1971
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ElementIterator ElementsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1169
MeshType::ConditionsContainerType ConditionsContainerType
Condintions container. A vector set of Conditions with their Id's as key.
Definition: model_part.h:183
PropertiesType::Pointer pGetProperties(IndexType PropertiesId, IndexType MeshIndex=0)
Returns the Properties::Pointer corresponding to it's identifier.
Definition: model_part.cpp:664
ConditionIterator ConditionsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1361
SizeType NumberOfProperties(IndexType ThisIndex=0) const
Returns the number of properties of the mesh.
Definition: model_part.cpp:575
MeshType::ElementsContainerType ElementsContainerType
Element container. A vector set of Elements with their Id's as key.
Definition: model_part.h:168
std::string & Name()
Definition: model_part.h:1811
NodeIterator NodesBegin(IndexType ThisIndex=0)
Definition: model_part.h:487
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
ElementsContainerType & Elements(IndexType ThisIndex=0)
Definition: model_part.h:1189
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
ElementIterator ElementsEnd(IndexType ThisIndex=0)
Definition: model_part.h:1179
NodeIterator NodesEnd(IndexType ThisIndex=0)
Definition: model_part.h:497
ModelPart & GetParentModelPart()
Definition: model_part.cpp:2124
ConditionIterator ConditionsEnd(IndexType ThisIndex=0)
Definition: model_part.h:1371
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
size_type size() const
Definition: pointer_vector.h:255
void reserve(size_type dim)
Definition: pointer_vector.h:319
void push_back(const TPointerType &x)
Definition: pointer_vector.h:270
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
#define KRATOS_THROW_ERROR(ExceptionType, ErrorMessage, MoreInfo)
Definition: define.h:77
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
GlobalPointersVector< Element > ElementWeakPtrVectorType
Definition: build_model_part_boundary_process.hpp:60
static int EchoLevel
Definition: co_sim_EMPIRE_API.h:42
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
ModelPart::NodesContainerType NodesContainerType
Definition: find_conditions_neighbours_process.h:44
ModelPart::ConditionsContainerType ConditionsContainerType
Definition: find_conditions_neighbours_process.h:45
GlobalPointersVector< Node > NodeWeakPtrVectorType
Definition: build_model_part_boundary_process.hpp:59
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
ModelPart::ElementsContainerType ElementsContainerType
Definition: clear_contact_conditions_mesher_process.hpp:43
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
f
Definition: generate_convection_diffusion_explicit_element.py:112
int dimension
Definition: isotropic_damage_automatic_differentiation.py:123
int j
Definition: quadrature.py:648
integer i
Definition: TensorModule.f:17
Definition: mesher_utilities.hpp:631
Condition const & GetReferenceCondition()
Definition: mesher_utilities.hpp:847
TransferParametersType::Pointer Transfer
Definition: mesher_utilities.hpp:690