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.
build_model_part_boundary_process.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosDelaunayMeshingApplication $
3 // Created by: $Author: JMCarbonell $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: April 2018 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_BUILD_MODEL_PART_BOUNDARY_PROCESS_H_INCLUDED )
11 #define KRATOS_BUILD_MODEL_PART_BOUNDARY_PROCESS_H_INCLUDED
12 
13 
14 // System includes
15 
16 // External includes
17 
18 // Project includes
19 #include "processes/process.h"
20 #include "includes/node.h"
21 #include "includes/element.h"
22 #include "includes/model_part.h"
23 
24 #include "geometries/line_2d_2.h"
25 #include "geometries/line_2d_3.h"
26 #include "geometries/line_3d_2.h"
29 
34 
36 
38 //Data: MASTER_ELEMENTS(set), MASTER_NODES(set), NEIGHBOUR_ELEMENTS(checked)
39 //StepData:
40 //Flags: (checked) CONTACT and RIGID
41 // (set) BOUNDARY and FREE_SURFACE (set)
42 // (modified)
43 // (reset)
44 //(set):=(set in this process)
45 
46 namespace Kratos
47 {
48 
51 
58 
65 
69 
73 
75 
78  : public MesherProcess
79 {
80  public:
83 
86 
89 
93 
96  std::string const rModelPartName,
97  int EchoLevel = 0)
98  : mrModelPart(rModelPart)
99  {
100  mModelPartName = rModelPartName;
102  }
103 
106  {
107  }
108 
109 
113 
114  void operator()()
115  {
116  Execute();
117  }
118 
119 
123 
124  void Execute() override
125  {
126 
127  KRATOS_TRY
128 
129  bool success=false;
130 
131  // double begin_time = OpenMPUtils::GetCurrentTime();
132 
133  unsigned int NumberOfSubModelParts=mrModelPart.NumberOfSubModelParts();
134 
136 
137  if( mModelPartName == mrModelPart.Name() ){
138 
139  for(auto& i_mp : mrModelPart.SubModelParts())
140  {
141 
142  if( mEchoLevel >= 1 )
143  std::cout<<" [ Construct Boundary on ModelPart ["<<i_mp.Name()<<"] ]"<<std::endl;
144 
145  success=UniqueSkinSearch(i_mp);
146 
147  if(!success)
148  {
149  std::cout<<" ERROR: BOUNDARY CONSTRUCTION FAILED ModelPart : ["<<i_mp.Name()<<"] "<<std::endl;
150  }
151  // else
152  // {
153  // if( mEchoLevel >= 1 ){
154  // double end_time = OpenMPUtils::GetCurrentTime();
155  // std::cout<<" [ Performed in Time = "<<end_time-begin_time<<" ]"<<std::endl;
156  // }
157  // //PrintSkin(i_mp);
158  // }
159  }
160  }
161  else{
162 
163  if( mEchoLevel >= 1 )
164  std::cout<<" [ Construct Boundary on ModelPart["<<mModelPartName<<"] ]"<<std::endl;
165 
167  success=UniqueSkinSearch(rModelPart);
168 
169  if(!success)
170  {
171  std::cout<<" ERROR: BOUNDARY CONSTRUCTION FAILED on ModelPart : ["<<rModelPart.Name()<<"] "<<std::endl;
172  }
173  // else
174  // {
175  // if( mEchoLevel >= 1 ){
176  // double end_time = OpenMPUtils::GetCurrentTime();
177  // std::cout<<" [ Performed in Time = "<<end_time-begin_time<<" ]"<<std::endl;
178  // }
179  // //PrintSkin(rModelPart);
180  // }
181  }
182 
183  if( NumberOfSubModelParts > 1 ){
184  SetMainModelPartConditions();
185  SetComputingModelPart();
186  }
187 
188  //ComputeBoundaryNormals BoundUtils;
189  BoundaryNormalsCalculationUtilities BoundaryComputation;
190  if( mModelPartName == mrModelPart.Name() ){
192  }
193  else{
195  BoundaryComputation.CalculateWeightedBoundaryNormals(rModelPart, mEchoLevel);
196  }
197 
198 
199  if( mEchoLevel >= 1 )
200  std::cout<<" Boundary Normals Computed and Assigned ] "<<std::endl;
201 
202  KRATOS_CATCH( "" )
203 
204  }
205 
206  void CheckMasterElement(int Id, const Element::WeakPointer& old_nelem, const Element::WeakPointer& new_nelem)
207  {
208  if( mEchoLevel >= 1 ){
209  KRATOS_ERROR << "sorry weak pointers are not any longer supported " << std::endl;
210  // if(!old_nelem.expired()){
211  // if(old_nelem->Id() != new_nelem->Id())
212  // std::cout<<"Condition "<<Id<<" WARNING: master elements ("<<old_nelem->Id()<<" != "<<new_nelem->Id()<<")"<<std::endl;
213  // }
214  // else{
215  // std::cout<<"Condition "<<Id<<" WARNING: master elements (expired != "<<new_nelem->Id()<<")"<<std::endl;
216  // }
217  }
218 
219  }
220 
221 
222  void CheckMasterNode(int Id, const Node::WeakPointer& old_nnode, const Node::Pointer& new_nnode)
223  {
224 
225  if( mEchoLevel >= 1 ){
226  KRATOS_ERROR << "sorry weak pointers are not any longer supported " << std::endl;
227 
228  // if(!old_nnode.expired()){
229  // if(old_nnode->Id() != new_nnode->Id())
230  // std::cout<<"Condition "<<Id<<" WARNING: master nodes ("<<old_nnode->Id()<<" != "<<new_nnode->Id()<<")"<<std::endl;
231  // }
232  // else{
233  // std::cout<<"Condition "<<Id<<" WARNING: master nodes (expired != "<<new_nnode->Id()<<")"<<std::endl;
234  // }
235  }
236 
237  }
238 
239 
241  {
242 
243  KRATOS_TRY
244 
245  int composite_conditions = 0;
246  int total_conditions = 0;
247  int counter = 0;
248 
249  bool found=false;
250 
251  if(mEchoLevel > 1)
252  std::cout<<" [ START SEARCH CONDITIONS MASTERS : "<<std::endl;
253 
254  for(auto& i_cond : mrModelPart.Conditions())
255  {
256  if(i_cond.Is(BOUNDARY)) //composite condition
257  ++composite_conditions;
258 
259  if(mEchoLevel > 1){
260  KRATOS_ERROR << "sorry weak pointers are not any longer supported " << std::endl;
261 
262  // std::cout<<" Masters::Condition ("<<i_cond.Id()<<")";
263  // auto& MasterElements = i_cond.GetValue(MASTER_ELEMENTS);
264  // if(MasterElements.size()!=0){
265  // if(!MasterElements(0).expired())
266  // std::cout<<" ME="<<MasterElements.front().Id()<<" (size:"<<MasterElements.size()<<")";
267  // }
268  // auto& MasterNodes = i_cond.GetValue(MASTER_NODES);
269  // if(MasterNodes.size()!=0){
270  // if(!MasterNodes(0).expired())
271  // std::cout<<" MN= "<<MasterNodes.front().Id()<<" (size:"<<MasterNodes.size()<<")";
272  // }
273  // std::cout<<std::endl;
274  }
275 
276  //********************************************************************
277 
278  DenseMatrix<unsigned int> lpofa; //connectivities of points defining faces
279  DenseVector<unsigned int> lnofa; //number of points defining faces
280 
281  GeometryType& cGeometry = i_cond.GetGeometry();
282  unsigned int size = cGeometry.size();
283 
284  bool perform_search = true;
285  for(unsigned int i=0; i<size; ++i)
286  {
287  if( cGeometry[i].Is(RIGID) ) //if is a rigid wall do not search else do search
288  perform_search = false;
289  }
290 
291 
292  if( i_cond.Is(CONTACT) )
293  perform_search = false;
294 
295  //********************************************************************
296  found=false;
297 
298  if( perform_search )
299  {
300 
301  if(size == 2){
302 
303  auto& nElements1 = cGeometry[0].GetValue(NEIGHBOUR_ELEMENTS);
304  auto& nElements2 = cGeometry[1].GetValue(NEIGHBOUR_ELEMENTS);
305 
306  if( nElements1.size() == 0 || nElements2.size() == 0 )
307  std::cout<<" NO SIZE in NEIGHBOUR_ELEMENTS "<<std::endl;
308 
309  KRATOS_ERROR << "sorry weak pointers are not any longer supported " << std::endl;
310 
311 
312  for(auto i_nelem(nElements1.begin()); i_nelem != nElements1.end(); ++i_nelem)
313  {
314  KRATOS_ERROR << "sorry weak pointers are not any longer supported " << std::endl;
315  //if(!i_nelem.base()->expired())
316  {
317 
318  for(auto j_nelem(nElements2.begin()); j_nelem != nElements2.end(); ++j_nelem)
319  {
320  //if(!j_nelem.base()->expired())
321  KRATOS_ERROR << "sorry weak pointers are not any longer supported " << std::endl;
322  {
323 
324  if(j_nelem->Id() == i_nelem->Id() && !found){
325 
326  auto& rMasterElements = i_cond.GetValue(MASTER_ELEMENTS);
327 
328  if(rMasterElements.size()){
329  this->CheckMasterElement(i_cond.Id(),rMasterElements(0),*i_nelem.base());
330  rMasterElements.clear();
331  }
332  else{
333  if(mEchoLevel >= 1)
334  std::cout<<" First Assignment of Master Elements "<<i_cond.Id()<<std::endl;
335  }
336 
337  rMasterElements.push_back(*i_nelem.base());
338 
339  GeometryType& eGeometry = i_nelem->GetGeometry();
340 
341  //get matrix nodes in faces
342  eGeometry.NodesInFaces(lpofa);
343  eGeometry.NumberNodesInFaces(lnofa);
344 
345  int node = 0;
346  for (unsigned int iface=0; iface<eGeometry.size(); ++iface)
347  {
348  MesherUtilities MesherUtils;
349  found = MesherUtils.FindCondition(cGeometry,eGeometry,lpofa,lnofa,iface);
350 
351  if(found){
352  node=iface;
353  break;
354  }
355  }
356 
357  if(found){
358  NodeWeakPtrVectorType& rMasterNodes = i_cond.GetValue(MASTER_NODES);
359 
360  if(rMasterNodes.size()){
361  const auto& pMaster = rMasterNodes(0);
362  const auto& pother = eGeometry(lpofa(0,node));
363  this->CheckMasterNode(i_cond.Id(),pMaster,pother);
364  rMasterNodes.clear();
365  }
366  else{
367  if(mEchoLevel >= 1)
368  std::cout<<" First Assignment of Master Nodes "<<i_cond.Id()<<std::endl;
369  }
370 
371  rMasterNodes.push_back(eGeometry(lpofa(0,node)));
372  }
373  else{
374  std::cout<<" 2N Geometry MASTER_NODE not FOUND : something is wrong "<<std::endl;
375  }
376  }
377  }
378  }
379  }
380  }
381  }
382  if(size == 3){
383 
384  auto& nElements1 = cGeometry[0].GetValue(NEIGHBOUR_ELEMENTS);
385  auto& nElements2 = cGeometry[1].GetValue(NEIGHBOUR_ELEMENTS);
386  auto& nElements3 = cGeometry[2].GetValue(NEIGHBOUR_ELEMENTS);
387 
388  if( nElements1.size() == 0 || nElements2.size() == 0 || nElements3.size() == 0 )
389  KRATOS_WARNING("")<<" NO SIZE in NEIGHBOUR_ELEMENTS "<<std::endl;
390 
391  for(auto i_nelem(nElements1.begin()); i_nelem != nElements1.end(); ++i_nelem)
392  {
393  KRATOS_ERROR << "sorry weak pointers are not any longer supported " << std::endl;
394  //if(!i_nelem.base()->expired())
395  {
396  for(auto j_nelem(nElements2.begin()); j_nelem != nElements2.end(); ++j_nelem)
397  {
398  KRATOS_ERROR << "sorry weak pointers are not any longer supported " << std::endl;
399  //if(!j_nelem.base()->expired())
400  {
401  if(j_nelem->Id() == i_nelem->Id() && !found)
402  {
403  for(auto k_nelem(nElements3.begin()); k_nelem != nElements3.end(); ++k_nelem)
404  {
405  KRATOS_ERROR << "sorry weak pointers are not any longer supported " << std::endl;
406  //if(!k_nelem.base()->expired())
407  {
408  if(k_nelem->Id() == i_nelem->Id() && !found)
409  {
410  auto& rMasterElements = i_cond.GetValue(MASTER_ELEMENTS);
411 
412  if(rMasterElements.size()){
413  this->CheckMasterElement(i_cond.Id(),rMasterElements(0),*i_nelem.base());
414  rMasterElements.clear();
415  }
416  else{
417  if(mEchoLevel >= 1)
418  std::cout<<" First Assignment of Master Elements "<<i_cond.Id()<<std::endl;
419  }
420 
421  rMasterElements.push_back(*i_nelem.base());
422 
423  GeometryType& eGeometry = i_nelem->GetGeometry();
424 
425  //get matrix nodes in faces
426  eGeometry.NodesInFaces(lpofa);
427  eGeometry.NumberNodesInFaces(lnofa);
428 
429  int node = 0;
430  for(unsigned int iface=0; iface<eGeometry.size(); ++iface)
431  {
432  MesherUtilities MesherUtils;
433  found = MesherUtils.FindCondition(cGeometry,eGeometry,lpofa,lnofa,iface);
434 
435  if(found){
436  node=iface;
437  break;
438  }
439  }
440 
441  if(found){
442 
443  NodeWeakPtrVectorType& rMasterNodes = i_cond.GetValue(MASTER_NODES);
444 
445  if(rMasterNodes.size()){
446  this->CheckMasterNode(i_cond.Id(),rMasterNodes(0),eGeometry(lpofa(0,node)));
447  rMasterNodes.clear();
448  }
449  else{
450  if(mEchoLevel >= 1)
451  std::cout<<" First Assignment of Master Nodes "<<i_cond.Id()<<std::endl;
452  }
453 
454  rMasterNodes.push_back(eGeometry(lpofa(0,node)));
455 
456  }
457  else{
458  std::cout<<" 3N Geometry MASTER_NODE not FOUND : something is wrong "<<std::endl;
459  }
460  }
461  }
462  }
463  }
464  }
465  }
466  }
467  }
468  }
469 
470  total_conditions++;
471  }
472 
473  //********************************************************************
474 
475  if(mEchoLevel > 1){
476  KRATOS_ERROR << "sorry weak pointers are not any longer supported " << std::endl;
477  // std::cout<<" SearchResult::Condition ("<<i_cond.Id()<<")";
478  // auto MasterElements = i_cond.GetValue(MASTER_ELEMENTS);
479  // if(MasterElements.size()!=0){
480  // if(!MasterElements(0).expired())
481  // std::cout<<" ME="<<MasterElements.front().Id()<<" (size:"<<MasterElements.size()<<")";
482  // }
483  // auto MasterNodes = i_cond.GetValue(MASTER_NODES);
484  // if(MasterNodes.size()!=0){
485  // if(!MasterNodes(0).expired())
486  // std::cout<<" MN= "<<MasterNodes.front().Id()<<" (size:"<<MasterNodes.size()<<")";
487  // }
488  // std::cout<<std::endl;
489  }
490 
491  if(found)
492  ++counter;
493 
494  }
495 
496  if(counter == total_conditions){
497  if(mEchoLevel >= 1)
498  std::cout<<" Condition Masters (ModelPart "<<mrModelPart.Name()<<"): LOCATED ["<<counter<<"]"<<std::endl;
499  found=true;
500  }
501  else{
502  if(mEchoLevel >= 1)
503  std::cout<<" Condition Masters (ModelPart "<<mrModelPart.Name()<<"): not LOCATED ["<<counter-total_conditions<<"]"<<std::endl;
504  found=false;
505  }
506 
507  if(counter != composite_conditions)
508  if(mEchoLevel >= 1)
509  std::cout<<" Condition Masters (ModelPart "<<mrModelPart.Name()<<"): LOCATED ["<<counter<<"] COMPOSITE ["<<composite_conditions<<"] NO MATCH"<<std::endl;
510 
511  if(mEchoLevel > 1)
512  std::cout<<" END SEARCH CONDITIONS MASTERS ] "<<found<<std::endl;
513 
514  return found;
515 
516  KRATOS_CATCH( "" )
517  }
518 
522 
523 
527 
528 
532 
534  std::string Info() const override
535  {
536  return "BuildModelPartBoundaryProcess";
537  }
538 
540  void PrintInfo(std::ostream& rOStream) const override
541  {
542  rOStream << "BuildModelPartBoundaryProcess";
543  }
544 
546  void PrintData(std::ostream& rOStream) const override
547  {
548  }
549 
550 
554 
555 
557 
558  protected:
561 
562 
566 
568 
569  std::string mModelPartName;
570 
572 
573 
577 
578 
582 
583  bool ClearMasterEntities( ModelPart& rModelPart, ModelPart::ConditionsContainerType& rTemporaryConditions)
584  {
585  KRATOS_TRY
586 
587  for(auto& i_cond : rTemporaryConditions)
588  {
589  i_cond.GetValue(MASTER_ELEMENTS).clear();
590  i_cond.GetValue(MASTER_NODES).clear();
591 
592  KRATOS_ERROR_IF(i_cond.GetValue(MASTER_ELEMENTS).size() || i_cond.GetValue(MASTER_NODES).size())<<
593  " Master Entities not cleared "<<std::endl;
594  }
595 
596  return true;
597 
598  KRATOS_CATCH( "" )
599  }
600 
601  bool UniqueSkinSearch( ModelPart& rModelPart )
602  {
603 
604  KRATOS_TRY
605 
606  if( mEchoLevel > 0 ){
607  std::cout<<" [ Initial Conditions : "<<rModelPart.Conditions().size()<<std::endl;
608  }
609 
610  if( !rModelPart.Elements().size() || (rModelPart.Is(ACTIVE)) ){
611  if( mEchoLevel > 0 ){
612  std::cout<<" [ Final Conditions : "<<rModelPart.Conditions().size()<<std::endl;
613  }
614  return true;
615  }
616 
617  //check if a remesh process has been performed and there is any node to erase
618  bool any_node_to_erase = false;
619  for(auto& i_node : rModelPart.Nodes())
620  {
621  if( any_node_to_erase == false )
622  if( i_node.Is(TO_ERASE) )
623  any_node_to_erase = true;
624  }
625 
626  //swap conditions for a temporary use
627  unsigned int ConditionId=1;
628  ModelPart::ConditionsContainerType TemporaryConditions;
629 
630  //if there are no conditions check main modelpart mesh conditions
631  if( !rModelPart.Conditions().size() ){
632 
634 
635  for(auto i_cond(rConditions.begin()); i_cond != rConditions.end(); ++i_cond)
636  {
637  TemporaryConditions.push_back(*i_cond.base());
638  i_cond->SetId(ConditionId);
639  ConditionId++;
640  }
641 
642  }
643  else{
644 
645  TemporaryConditions.reserve(rModelPart.Conditions().size());
646  TemporaryConditions.swap(rModelPart.Conditions());
647 
648  //set consecutive ids in the mesh conditions
649  if( any_node_to_erase ){
650  for(auto& i_cond : TemporaryConditions)
651  {
652  GeometryType& cGeometry = i_cond.GetGeometry();
653  for(unsigned int i=0; i<cGeometry.size(); ++i)
654  {
655  if(cGeometry[i].Is(TO_ERASE)){
656  i_cond.Set(TO_ERASE);
657  break;
658  }
659  }
660 
661  i_cond.SetId(ConditionId);
662  ++ConditionId;
663  }
664  }
665  else{
666  for(auto& i_cond : TemporaryConditions)
667  {
668  i_cond.SetId(ConditionId);
669  ++ConditionId;
670  }
671  }
672 
673  }
674 
675  //control the previous mesh conditions
676  std::vector<int> PreservedConditions( TemporaryConditions.size() + 1 );
677  std::fill( PreservedConditions.begin(), PreservedConditions.end(), 0 );
678 
679  //build new skin for the Modelpart
680  this->BuildCompositeConditions(rModelPart, TemporaryConditions, PreservedConditions, ConditionId);
681 
682  //add other conditions out of the skin space dimension
683  this->AddOtherConditions(rModelPart, TemporaryConditions, PreservedConditions, ConditionId);
684 
685  return true;
686 
687  KRATOS_CATCH( "" )
688  }
689 
690  virtual void SetBoundaryFlags( ModelPart& rModelPart )
691  {
692 
693  KRATOS_TRY
694 
695  //clear nodal boundary flag
696  for(auto& i_elem : rModelPart.Elements())
697  {
698  GeometryType& eGeometry = i_elem.GetGeometry();
699 
700  for(unsigned int j=0; j<eGeometry.size(); ++j)
701  {
702  eGeometry[j].Set(BOUNDARY,false);
703  if(rModelPart.Is(FLUID)){
704  eGeometry[j].Set(FREE_SURFACE,false);
705  }
706  }
707  }
708 
709  for(auto& i_elem : rModelPart.Elements())
710  {
711  GeometryType& eGeometry = i_elem.GetGeometry();
712 
713  const unsigned int dimension = eGeometry.WorkingSpaceDimension();
714 
715  if( eGeometry.FacesNumber() >= (dimension+1) ){ //3 or 4
716 
717  DenseMatrix<unsigned int> lpofa; //connectivities of points defining faces
718  DenseVector<unsigned int> lnofa; //number of points defining faces
719 
720  //get matrix nodes in faces
721  eGeometry.NodesInFaces(lpofa);
722  eGeometry.NumberNodesInFaces(lnofa);
723 
724  auto& nElements = i_elem.GetValue(NEIGHBOUR_ELEMENTS);
725 
726  //loop on neighbour elements of an element
727  unsigned int iface=0;
728  for(auto& i_nelem : nElements)
729  {
730  unsigned int NumberNodesInFace = lnofa[iface];
731  if(i_nelem.Id() == i_elem.Id())
732  {
733  //if no neighbour is present => the face is free surface
734  unsigned int rigid_nodes = 0;
735  unsigned int inlet_nodes = 0;
736  unsigned int free_surface_nodes = 0;
737  for(unsigned int j=1; j<=NumberNodesInFace; ++j)
738  {
739  eGeometry[lpofa(j,iface)].Set(BOUNDARY,true);
740  if(rModelPart.Is(FLUID)){
741  if(eGeometry[lpofa(j,iface)].Is(RIGID) || eGeometry[lpofa(j,iface)].Is(SOLID)){
742  ++rigid_nodes;
743  }
744  else if(eGeometry[lpofa(j,iface)].Is(INLET)){
745  ++inlet_nodes;
746  }
747  else{
748  ++free_surface_nodes;
749  }
750  }
751  //std::cout<<" node ["<<j<<"]"<<eGeometry[lpofa(j,iface)].Id()<<std::endl;
752  }
753 
754  if(rModelPart.Is(FLUID)){
755  if( (free_surface_nodes>0 && (rigid_nodes>0 || inlet_nodes>0)) || (rigid_nodes==0 && inlet_nodes==0) ){
756  for(unsigned int j=1; j<=NumberNodesInFace; ++j)
757  {
758  eGeometry[lpofa(j,iface)].Set(FREE_SURFACE,true);
759  }
760  }
761  }
762 
763  } //end face condition
764 
765  ++iface;
766  } //end loop neighbours
767 
768  }
769  else{
770  //set nodes to BOUNDARY for elements outside of the working space dimension
771  for(unsigned int j=0; j<eGeometry.size(); ++j)
772  {
773  eGeometry[j].Set(BOUNDARY,true);
774  }
775  }
776  }
777 
778 
779  KRATOS_CATCH( "" )
780  }
781 
782  virtual bool BuildCompositeConditions( ModelPart& rModelPart, ModelPart::ConditionsContainerType& rTemporaryConditions, std::vector<int>& rPreservedConditions, unsigned int& rConditionId )
783  {
784 
785  KRATOS_TRY
786 
787  //master conditions must be deleted and set them again in the build
788  this->ClearMasterEntities(rModelPart, rTemporaryConditions);
789 
790  //properties to be used in the generation
791  int number_properties = rModelPart.GetParentModelPart().NumberOfProperties();
792 
793  if(number_properties<0)
794  KRATOS_ERROR<<" number of properties is "<<number_properties<<std::endl;
795 
796  Properties::Pointer properties = rModelPart.GetParentModelPart().GetMesh().pGetProperties(number_properties-1);
797 
798  //clear nodal boundary flag
799  for(auto& i_elem : rModelPart.Elements())
800  {
801  GeometryType& eGeometry = i_elem.GetGeometry();
802 
803  for(unsigned int j=0; j<eGeometry.size(); ++j)
804  {
805  eGeometry[j].Set(BOUNDARY,false);
806  if(rModelPart.Is(FLUID)){
807  eGeometry[j].Set(FREE_SURFACE,false);
808  }
809  }
810  }
811 
812  ElementsContainerType& rElements = rModelPart.Elements();
813  rConditionId=0;
814  for(auto i_elem(rElements.begin()); i_elem != rElements.end(); ++i_elem)
815  {
816  GeometryType& eGeometry = i_elem->GetGeometry();
817 
818  const unsigned int dimension = eGeometry.WorkingSpaceDimension();
819 
820  if( eGeometry.FacesNumber() >= (dimension+1) ){ //3 or 4
821 
822  //********************************************************************
823  /*each face is opposite to the corresponding node number so in 2D triangle
824  0 ----- 1 2
825  1 ----- 2 0
826  2 ----- 0 1
827  */
828 
829  /*each face is opposite to the corresponding node number so in 3D tetrahedron
830  0 ----- 1 2 3
831  1 ----- 2 0 3
832  2 ----- 0 1 3
833  3 ----- 0 2 1
834  */
835  //********************************************************************
836 
837  //finding boundaries and creating the "skin"
838  DenseMatrix<unsigned int> lpofa; //connectivities of points defining faces
839  DenseVector<unsigned int> lnofa; //number of points defining faces
840 
841  auto& nElements = i_elem->GetValue(NEIGHBOUR_ELEMENTS);
842 
843  //get matrix nodes in faces
844  eGeometry.NodesInFaces(lpofa);
845  eGeometry.NumberNodesInFaces(lnofa);
846 
847  //loop on neighbour elements of an element
848  unsigned int iface=0;
849  for(auto& i_nelem : nElements)
850  {
851  unsigned int NumberNodesInFace = lnofa[iface];
852  if(i_nelem.Id() == i_elem->Id())
853  {
854  //if no neighbour is present => the face is free surface
855  unsigned int rigid_nodes = 0;
856  unsigned int inlet_nodes = 0;
857  unsigned int free_surface_nodes = 0;
858  for(unsigned int j=1; j<=NumberNodesInFace; ++j)
859  {
860  eGeometry[lpofa(j,iface)].Set(BOUNDARY,true);
861  if(rModelPart.Is(FLUID)){
862  if(eGeometry[lpofa(j,iface)].Is(RIGID) || eGeometry[lpofa(j,iface)].Is(SOLID)){
863  ++rigid_nodes;
864  }
865  else if(eGeometry[lpofa(j,iface)].Is(INLET)){
866  ++inlet_nodes;
867  }
868  else{
869  ++free_surface_nodes;
870  }
871  }
872  //std::cout<<" node ["<<j<<"]"<<eGeometry[lpofa(j,iface)].Id()<<std::endl;
873  }
874 
875  if(rModelPart.Is(FLUID)){
876  if( (free_surface_nodes>0 && (rigid_nodes>0 || inlet_nodes>0)) || (rigid_nodes==0 && inlet_nodes==0) ){
877  for(unsigned int j=1; j<=NumberNodesInFace; ++j)
878  {
879  eGeometry[lpofa(j,iface)].Set(FREE_SURFACE,true);
880  }
881  }
882  }
883 
884  //1.- create geometry: points array and geometry type
885  Condition::NodesArrayType FaceNodes;
886  Condition::GeometryType::Pointer ConditionVertices;
887 
888  FaceNodes.reserve(NumberNodesInFace);
889 
890  for(unsigned int j=1; j<=NumberNodesInFace; ++j)
891  {
892  FaceNodes.push_back(eGeometry(lpofa(j,iface)));
893  }
894 
895 
896  if( NumberNodesInFace == 2 ){
897  if( dimension == 2 )
898  ConditionVertices = Kratos::make_shared< Line2D2< Node > >(FaceNodes);
899  else
900  ConditionVertices = Kratos::make_shared< Line3D2< Node > >(FaceNodes);
901 
902  }
903  else if ( NumberNodesInFace == 3 ){
904  if( dimension == 2 )
905  ConditionVertices = Kratos::make_shared< Line2D3< Node > >(FaceNodes);
906  else
907  ConditionVertices = Kratos::make_shared< Triangle3D3< Node > >(FaceNodes);
908  }
909 
910  rConditionId +=1;
911 
912  //Create a composite condition
913  CompositeCondition::Pointer p_cond = Kratos::make_intrusive< CompositeCondition >(rConditionId,ConditionVertices,properties);
914 
915  bool condition_found = false;
916  bool point_condition = false;
917 
918  // Search for existing conditions: start
919  for(auto i_cond(rTemporaryConditions.begin()); i_cond != rTemporaryConditions.end(); ++i_cond)
920  {
921  GeometryType& cGeometry = i_cond->GetGeometry();
922 
923  MesherUtilities MesherUtils;
924  condition_found = MesherUtils.FindCondition(cGeometry,eGeometry,lpofa,lnofa,iface);
925 
926  if( condition_found ){
927 
928  p_cond->AddChild(*i_cond.base());
929 
930  rPreservedConditions[i_cond->Id()] += 1;
931 
932  if( cGeometry.PointsNumber() == 1 )
933  point_condition = true;
934  }
935 
936  }
937  // Search for existing conditions: end
938 
939  if( !point_condition ){
940  // usually one MasterElement and one MasterNode for 2D and 3D simplex
941  // can be more than one in other geometries -> it has to be extended to that cases
942 
943  // std::cout<<" ID "<<p_cond->Id()<<" MASTER ELEMENT "<<i_elem->Id()<<std::endl;
944  // std::cout<<" MASTER NODE "<<eGeometry[lpofa(0,iface)].Id()<<" or "<<eGeometry[lpofa(NumberNodesInFace,iface)].Id()<<std::endl;
945 
946  auto& MasterElements = p_cond->GetValue(MASTER_ELEMENTS);
947  MasterElements.push_back(*i_elem.base());
948 
949  NodeWeakPtrVectorType& MasterNodes = p_cond->GetValue(MASTER_NODES);
950  MasterNodes.push_back(eGeometry(lpofa(0,iface)));
951 
952  }
953 
954  rModelPart.Conditions().push_back(p_cond);
955  // Set new conditions: end
956 
957  } //end face condition
958 
959  ++iface;
960  } //end loop neighbours
961 
962  }
963  else{
964  //set nodes to BOUNDARY for elements outside of the working space dimension
965  for(unsigned int j=0; j<eGeometry.size(); ++j)
966  {
967  eGeometry[j].Set(BOUNDARY,true);
968  }
969  }
970  }
971 
972 
973  return true;
974 
975  KRATOS_CATCH( "" )
976  }
977 
978  bool FindConditionID(ModelPart& rModelPart, GeometryType& rGeometry)
979  {
980  KRATOS_TRY
981 
982  //check if the condition exists and belongs to the modelpart checking node Ids
983  for(unsigned int i=0; i<rGeometry.size(); ++i)
984  {
985  for(auto& i_node : rModelPart.Nodes())
986  {
987  if( rGeometry[i].Id() == i_node.Id() )
988  return true;
989  }
990  }
991 
992  return false;
993 
994  KRATOS_CATCH( "" )
995  }
996 
997  void PrintSkin(ModelPart& rModelPart)
998  {
999 
1000  KRATOS_TRY
1001 
1002  //PRINT SKIN:
1003  std::cout<<" CONDITIONS: geometry nodes ("<<rModelPart.Conditions().size()<<")"<<std::endl;
1004 
1005  for(auto& i_cond : rModelPart.Conditions())
1006  {
1007  GeometryType& cGeometry = i_cond.GetGeometry();
1008  std::cout<<"["<<i_cond.Id()<<"]:"<<std::endl;
1009  //i_cond.PrintInfo(std::cout);
1010  std::cout<<"( ";
1011  for(unsigned int i = 0; i < cGeometry.size(); ++i)
1012  {
1013  std::cout<< cGeometry[i].Id()<<", ";
1014  }
1015  std::cout<<" ): ";
1016 
1017  i_cond.GetValue(MASTER_ELEMENTS).front().PrintInfo(std::cout);
1018 
1019  std::cout<<std::endl;
1020  }
1021  std::cout<<std::endl;
1022 
1023  KRATOS_CATCH( "" )
1024 
1025  }
1026 
1027  bool AddOtherConditions(ModelPart& rModelPart, ModelPart::ConditionsContainerType& rTemporaryConditions, std::vector<int>& rPreservedConditions, unsigned int& rConditionId)
1028  {
1029 
1030  KRATOS_TRY
1031 
1032  unsigned int counter = 0;
1033 
1034  //add all previous conditions not found in the skin search:
1035  for(auto& i_cond : rTemporaryConditions)
1036  {
1037  if(rPreservedConditions[i_cond.Id()] == 0){ //I have not used the condition and any node of the condition
1038 
1039  if(this->CheckAcceptedCondition(rModelPart, i_cond)){
1040 
1041  GeometryType& cGeometry = i_cond.GetGeometry();
1042 
1043  Condition::NodesArrayType FaceNodes;
1044 
1045  FaceNodes.reserve(cGeometry.size() );
1046 
1047  for(unsigned int j=0; j<cGeometry.size(); ++j)
1048  {
1049  FaceNodes.push_back(cGeometry(j));
1050  }
1051 
1052  rPreservedConditions[i_cond.Id()] += 1;
1053 
1054  rConditionId +=1;
1055 
1056  Condition::Pointer p_cond = i_cond.Clone(rConditionId, FaceNodes);
1057 
1058  this->AddConditionToModelPart(rModelPart,p_cond);
1059 
1060  counter++;
1061  }
1062  }
1063  }
1064 
1065  //control if all previous conditions have been added:
1066  bool all_assigned = true;
1067  unsigned int lost_conditions = 0;
1068  for(unsigned int i=1; i<rPreservedConditions.size(); ++i)
1069  {
1070  if( rPreservedConditions[i] == 0 ){
1071  all_assigned = false;
1072  lost_conditions++;
1073  }
1074  }
1075 
1076  if( mEchoLevel >= 1 ){
1077  std::cout<<" Final Conditions : "<<rModelPart.NumberOfConditions()<<std::endl;
1078  if(all_assigned == true)
1079  std::cout<<" ALL_PREVIOUS_CONDITIONS_RELOCATED "<<std::endl;
1080  else
1081  std::cout<<" SOME_PREVIOUS_CONDITIONS_ARE_LOST [lost_conditions:"<<lost_conditions<<"]"<<std::endl;
1082  }
1083 
1084  return all_assigned;
1085 
1086  KRATOS_CATCH( "" )
1087 
1088  }
1089 
1090  virtual bool CheckAcceptedCondition(ModelPart& rModelPart, Condition& rCondition)
1091  {
1092  KRATOS_TRY
1093 
1094  GeometryType& cGeometry = rCondition.GetGeometry();
1095 
1096  bool accepted = FindConditionID(rModelPart, cGeometry);
1097 
1098  return accepted;
1099 
1100  KRATOS_CATCH( "" )
1101  }
1102 
1103  virtual void AddConditionToModelPart(ModelPart& rModelPart, Condition::Pointer pCondition)
1104  {
1105  KRATOS_TRY
1106 
1107  rModelPart.AddCondition(pCondition);
1108  //rModelPart.Conditions().push_back(pCondition);
1109 
1110  KRATOS_CATCH( "" )
1111  }
1112 
1114  {
1115  //reset the boundary flag in all nodes (set old_entity in edge nodes to be recognized)
1116  if(rModelPart.Is(FLUID)){
1117 
1118  for(auto& i_node : rModelPart.Nodes())
1119  {
1120  i_node.Set(FREE_SURFACE,false);
1121  }
1122 
1123  }
1124  }
1125 
1129 
1133 
1137 
1139 
1140  private:
1152 
1153  void SetComputingModelPart()
1154  {
1155  KRATOS_TRY
1156 
1157  std::string ComputingModelPartName;
1158  for(auto& i_mp : mrModelPart.SubModelParts())
1159  {
1160  if(i_mp.Is(ACTIVE) && i_mp.IsNot(THERMAL))
1161  ComputingModelPartName = i_mp.Name();
1162  }
1163 
1164  ModelPart& rModelPart = mrModelPart.GetSubModelPart(ComputingModelPartName);
1165 
1166  if( mEchoLevel >= 1 ){
1167  std::cout<<" ["<<ComputingModelPartName<<" :: CONDITIONS [OLD:"<<rModelPart.NumberOfConditions();
1168  }
1169 
1170  ModelPart::ConditionsContainerType KeepConditions;
1171 
1172  for(auto& i_mp : mrModelPart.SubModelParts())
1173  {
1174  if( i_mp.NumberOfElements() && ComputingModelPartName != i_mp.Name() ){ //conditions of model_parts with elements only
1175 
1176  ModelPart::ConditionsContainerType& rConditions = i_mp.Conditions();
1177 
1178  for(auto i_cond(rConditions.begin()); i_cond != rConditions.end(); ++i_cond)
1179  {
1180  // i_cond->PrintInfo(std::cout);
1181  // std::cout<<" -- "<<std::endl;
1182  KeepConditions.push_back(*i_cond.base());
1183  // KeepConditions.back().PrintInfo(std::cout);
1184  // std::cout<<std::endl;
1185  }
1186  }
1187  }
1188 
1189  rModelPart.Conditions().swap(KeepConditions);
1190 
1191  if( mEchoLevel >= 1 ){
1192  std::cout<<" / NEW:"<<rModelPart.NumberOfConditions()<<"] "<<std::endl;
1193  }
1194 
1195  KRATOS_CATCH( "" )
1196 
1197  }
1198 
1199  void SetMainModelPartConditions()
1200  {
1201 
1202  KRATOS_TRY
1203 
1204  if( mEchoLevel >= 1 ){
1205  std::cout<<" ["<<mrModelPart.Name()<<" :: CONDITIONS [OLD:"<<mrModelPart.NumberOfConditions();
1206  }
1207 
1208  //contact conditions are located on Mesh_0
1209  ModelPart::ConditionsContainerType KeepConditions;
1210 
1211  unsigned int condId=1;
1212  if( mModelPartName == mrModelPart.Name() ){
1213 
1214  for(auto& i_mp : mrModelPart.SubModelParts())
1215  {
1216  if( !(i_mp.Is(ACTIVE)) && !(i_mp.Is(CONTACT)) ){
1217  //std::cout<<" ModelPartName "<<i_mp.Name()<<" conditions "<<i_mp.NumberOfConditions()<<std::endl;
1218  ModelPart::ConditionsContainerType& rConditions = i_mp.Conditions();
1219 
1220  for(auto i_cond(rConditions.begin()); i_cond != rConditions.end(); ++i_cond)
1221  {
1222  // i_cond.PrintInfo(std::cout);
1223  // std::cout<<" -- "<<std::endl;
1224  KeepConditions.push_back(*(i_cond.base()));
1225  KeepConditions.back().SetId(condId);
1226  condId+=1;
1227  // KeepConditions.back().PrintInfo(std::cout);
1228  // std::cout<<std::endl;
1229  }
1230  }
1231  }
1232  }
1233 
1235 
1236  for(auto i_cond(rConditions.begin()); i_cond != rConditions.end(); ++i_cond)
1237  {
1238  if(i_cond->Is(CONTACT)){
1239  KeepConditions.push_back(*i_cond.base());
1240  KeepConditions.back().SetId(condId);
1241  condId+=1;
1242  //std::cout<<" -- "<<std::endl;
1243  //KeepConditions.back().PrintInfo(std::cout);
1244  //std::cout<<std::endl;
1245  }
1246 
1247  }
1248 
1249 
1250  mrModelPart.Conditions().swap(KeepConditions);
1251 
1252  if( mEchoLevel >= 1 ){
1253  std::cout<<" / NEW:"<<mrModelPart.NumberOfConditions()<<"] "<<std::endl;
1254  }
1255 
1256  KRATOS_CATCH( "" )
1257  }
1258 
1259 
1269 
1272 
1274  //BuildModelPartBoundaryProcess(BuildModelPartBoundaryProcess const& rOther);
1275 
1276 
1278 
1279 }; // Class BuildModelPartBoundaryProcess
1280 
1282 
1285 
1286 
1290 
1291 
1293 inline std::istream& operator >> (std::istream& rIStream,
1295 
1297 inline std::ostream& operator << (std::ostream& rOStream,
1298  const BuildModelPartBoundaryProcess& rThis)
1299 {
1300  rThis.PrintInfo(rOStream);
1301  rOStream << std::endl;
1302  rThis.PrintData(rOStream);
1303 
1304  return rOStream;
1305 }
1307 
1308 
1309 } // namespace Kratos.
1310 
1311 #endif // KRATOS_BUILD_MODEL_PART_BOUNDARY_PROCESS_H_INCLUDED defined
Definition: boundary_normals_calculation_utilities.hpp:48
void CalculateWeightedBoundaryNormals(ModelPart &rModelPart, int EchoLevel=0)
Calculates the area normal (unitary vector oriented as the normal) and weight the normal to shrink.
Definition: boundary_normals_calculation_utilities.hpp:123
Short class definition.
Definition: build_model_part_boundary_process.hpp:79
void ResetFreeSurfaceFlag(ModelPart &rModelPart)
Definition: build_model_part_boundary_process.hpp:1113
ModelPart::ConditionType ConditionType
Definition: build_model_part_boundary_process.hpp:84
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: build_model_part_boundary_process.hpp:540
bool AddOtherConditions(ModelPart &rModelPart, ModelPart::ConditionsContainerType &rTemporaryConditions, std::vector< int > &rPreservedConditions, unsigned int &rConditionId)
Definition: build_model_part_boundary_process.hpp:1027
ConditionType::GeometryType GeometryType
Definition: build_model_part_boundary_process.hpp:85
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: build_model_part_boundary_process.hpp:546
KRATOS_CLASS_POINTER_DEFINITION(BuildModelPartBoundaryProcess)
Pointer definition of BuildModelPartBoundaryProcess.
std::string Info() const override
Turn back information as a string.
Definition: build_model_part_boundary_process.hpp:534
virtual ~BuildModelPartBoundaryProcess()
Destructor.
Definition: build_model_part_boundary_process.hpp:105
virtual void SetBoundaryFlags(ModelPart &rModelPart)
Definition: build_model_part_boundary_process.hpp:690
bool UniqueSkinSearch(ModelPart &rModelPart)
Definition: build_model_part_boundary_process.hpp:601
virtual void AddConditionToModelPart(ModelPart &rModelPart, Condition::Pointer pCondition)
Definition: build_model_part_boundary_process.hpp:1103
void CheckMasterNode(int Id, const Node::WeakPointer &old_nnode, const Node::Pointer &new_nnode)
Definition: build_model_part_boundary_process.hpp:222
int mEchoLevel
Definition: build_model_part_boundary_process.hpp:571
bool FindConditionID(ModelPart &rModelPart, GeometryType &rGeometry)
Definition: build_model_part_boundary_process.hpp:978
ModelPart & mrModelPart
Definition: build_model_part_boundary_process.hpp:567
void operator()()
Definition: build_model_part_boundary_process.hpp:114
virtual bool CheckAcceptedCondition(ModelPart &rModelPart, Condition &rCondition)
Definition: build_model_part_boundary_process.hpp:1090
void Execute() override
Execute method is used to execute the Process algorithms.
Definition: build_model_part_boundary_process.hpp:124
virtual bool BuildCompositeConditions(ModelPart &rModelPart, ModelPart::ConditionsContainerType &rTemporaryConditions, std::vector< int > &rPreservedConditions, unsigned int &rConditionId)
Definition: build_model_part_boundary_process.hpp:782
bool ClearMasterEntities(ModelPart &rModelPart, ModelPart::ConditionsContainerType &rTemporaryConditions)
Definition: build_model_part_boundary_process.hpp:583
void CheckMasterElement(int Id, const Element::WeakPointer &old_nelem, const Element::WeakPointer &new_nelem)
Definition: build_model_part_boundary_process.hpp:206
bool SearchConditionMasters()
Definition: build_model_part_boundary_process.hpp:240
std::string mModelPartName
Definition: build_model_part_boundary_process.hpp:569
void PrintSkin(ModelPart &rModelPart)
Definition: build_model_part_boundary_process.hpp:997
BuildModelPartBoundaryProcess(ModelPart &rModelPart, std::string const rModelPartName, int EchoLevel=0)
Default constructor.
Definition: build_model_part_boundary_process.hpp:95
Base class for all Conditions.
Definition: condition.h:59
bool Is(Flags const &rOther) const
Definition: flags.h:274
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
IndexType const & Id() const
Id of this Geometry.
Definition: geometry.h:964
virtual void NodesInFaces(DenseMatrix< unsigned int > &rNodesInFaces) const
Definition: geometry.h:2195
virtual void NumberNodesInFaces(DenseVector< unsigned int > &rNumberNodesInFaces) const
Definition: geometry.h:2190
TVariableType::Type & GetValue(const TVariableType &rThisVariable)
Definition: geometry.h:627
virtual SizeType FacesNumber() const
Returns the number of faces of the current geometry.
Definition: geometry.h:2152
SizeType WorkingSpaceDimension() const
Definition: geometry.h:1287
This class is a vector which stores global pointers.
Definition: global_pointers_vector.h:61
void push_back(TPointerType x)
Definition: global_pointers_vector.h:322
void clear()
Definition: global_pointers_vector.h:361
size_type size() const
Definition: global_pointers_vector.h:307
Definition: amatrix_interface.h:41
PropertiesType::Pointer pGetProperties(IndexType PropertiesId)
Definition: mesh.h:394
The base class for processes passed to the solution scheme.
Definition: mesher_process.hpp:37
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
MeshType::ConditionsContainerType ConditionsContainerType
Condintions container. A vector set of Conditions with their Id's as key.
Definition: model_part.h:183
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
SizeType NumberOfSubModelParts() const
Definition: model_part.h:1665
std::string & Name()
Definition: model_part.h:1811
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
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
void AddCondition(ConditionType::Pointer pNewCondition, IndexType ThisIndex=0)
Definition: model_part.cpp:1436
SubModelPartsContainerType & SubModelParts()
Definition: model_part.h:1718
SizeType NumberOfConditions(IndexType ThisIndex=0) const
Definition: model_part.h:1218
ModelPart & GetSubModelPart(std::string const &SubModelPartName)
Definition: model_part.cpp:2029
ModelPart & GetParentModelPart()
Definition: model_part.cpp:2124
MeshType & GetMesh(IndexType ThisIndex=0)
Definition: model_part.h:1791
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
void reserve(size_type dim)
Definition: pointer_vector.h:319
void push_back(const TPointerType &x)
Definition: pointer_vector.h:270
void push_back(TPointerType x)
Adds a pointer to the end of the set.
Definition: pointer_vector_set.h:544
#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
#define KRATOS_ERROR
Definition: exception.h:161
#define KRATOS_ERROR_IF(conditional)
Definition: exception.h:162
#define KRATOS_WARNING(label)
Definition: logger.h:265
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
GlobalPointersVector< Condition > ConditionWeakPtrVectorType
Definition: build_model_part_boundary_process.hpp:61
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
int dimension
Definition: isotropic_damage_automatic_differentiation.py:123
int j
Definition: quadrature.py:648
int counter
Definition: script_THERMAL_CORRECT.py:218
integer i
Definition: TensorModule.f:17
Definition: mesh_converter.cpp:38