parameters: (self)
docstring: This method is executed at the begining to initialize the process
  
          Keyword arguments:
          self -- It signifies an instance of a class.
docstring_summary: This method is executed at the begining to initialize the process
docstring_tokens: This method is executed at the begining to initialize the process
function: def ExecuteInitialize(self):
          """ This method is executed at the begining to initialize the process
  
          Keyword arguments:
          self -- It signifies an instance of a class.
          """
  
          # First we generate or identify the different model parts
          if self.main_model_part.HasSubModelPart("Contact"):
              # If remeshed we remove and redo everything from scratch
              if self.main_model_part.GetRootModelPart().Is(KM.MODIFIED):
                  self.preprocess = True
  
                  # Clean up contact pairs
                  CSMA.ContactUtilities.CleanContactModelParts(self.main_model_part)
  
                  # We remove the submodelpart
                  self.main_model_part.RemoveSubModelPart("Contact")
  
                  KM.AuxiliarModelPartUtilities(self.main_model_part).EnsureModelPartOwnsProperties(True)
                  KM.AuxiliarModelPartUtilities(self.main_model_part.GetRootModelPart()).EnsureModelPartOwnsProperties(True)
  
                  # We create the submodelpart
                  self.search_model_part = self.main_model_part.CreateSubModelPart("Contact")
              else:
                  self.preprocess = False
                  # We get the submodelpart
                  self.search_model_part = self.main_model_part.GetSubModelPart("Contact")
          else:
              self.preprocess = True
              # We create the submodelpart
              self.search_model_part = self.main_model_part.CreateSubModelPart("Contact")
  
          # In case of no "Contact" model part we create it
          if self.preprocess:
              # In case no model part is assigned we detect the skin
              self.count_search_model_part = 0
              for key in self.settings["search_model_part"].keys():
                  if self.settings["search_model_part"][key].size() > 0:
                      self.count_search_model_part += 1
              if self.count_search_model_part == 0:
                  self.__detect_skin(self.main_model_part)
              else:
                  for key in self.settings["search_model_part"].keys():
                      if self.settings["search_model_part"][key].size() > 0:
                          self.__generate_search_model_part_from_input_list(self.settings["search_model_part"][key], key)
  
          # We compute NODAL_H that can be used in the search and some values computation
          self.find_nodal_h = KM.FindNodalHProcess(self.main_model_part)
          self.find_nodal_h.Execute()
  
          # We check the normals
          normal_check_parameters = KM.Parameters("""{"length_proportion" : 0.1}""")
          normal_check_parameters["length_proportion"].SetDouble(self.settings["normal_check_proportion"].GetDouble())
          check_normal_process = CSMA.NormalCheckProcess(self.main_model_part, normal_check_parameters)
          check_normal_process.Execute()
  
          ## We recompute the search factor and the check in function of the relative size of the mesh
          if self.settings["search_parameters"]["adapt_search"].GetBool():
              factor = CSMA.ContactUtilities.CalculateRelativeSizeMesh(self.main_model_part)
              KM.Logger.PrintWarning("SEARCH ADAPT FACTOR: ", "{:.2e}".format(factor))
              search_factor = self.settings["search_parameters"]["search_factor"].GetDouble() * factor
              self.settings["search_parameters"]["search_factor"].SetDouble(search_factor)
              active_check_factor = self.settings["search_parameters"]["active_check_factor"].GetDouble() * factor
              self.settings["search_parameters"]["active_check_factor"].SetDouble(active_check_factor)
  
          # We call the process info
          self._initialize_process_info()
  
          #If the conditions doesn't exist we create them
          if self.preprocess is False:
              master_slave_process = CSMA.MasterSlaveProcess(self.main_model_part)
              master_slave_process.Execute()
  
          # Setting the integration order and active check factor
          KM.AuxiliarModelPartUtilities(self._get_process_model_part()).RecursiveEnsureModelPartOwnsProperties(True)
          for prop in self._get_process_model_part().GetProperties():
              prop[CSMA.INTEGRATION_ORDER_CONTACT] = self.settings["integration_order"].GetInt()
              prop[CSMA.CONSIDER_TESSELLATION] = self.settings["consider_tessellation"].GetBool()
  
          # We initialize the contact values
          self._initialize_search_values()
  
          # We initialize some other process values
          self._initialize_problem_parameters()
  
          # Creating the search
          self.search_utility_list = {}
          for key in self.settings["search_model_part"].keys():
              if self.settings["search_model_part"][key].size() > 0:
                  self._create_main_search(key)
  
          # We initialize conditions
          self._initialize_search_conditions()
  
          # We perform search initializations
          for key in self.settings["search_model_part"].keys():
              if self.settings["search_model_part"][key].size() > 0:
                  # We initialize the search utility
                  self.search_utility_list[key].ExecuteInitialize()
function_tokens: def ExecuteInitialize ( self ) : # First we generate or identify the different model parts if self . main_model_part . HasSubModelPart ( "Contact" ) : # If remeshed we remove and redo everything from scratch if self . main_model_part . GetRootModelPart ( ) . Is ( KM . MODIFIED ) : self . preprocess = True # Clean up contact pairs CSMA . ContactUtilities . CleanContactModelParts ( self . main_model_part ) # We remove the submodelpart self . main_model_part . RemoveSubModelPart ( "Contact" ) KM . AuxiliarModelPartUtilities ( self . main_model_part ) . EnsureModelPartOwnsProperties ( True ) KM . AuxiliarModelPartUtilities ( self . main_model_part . GetRootModelPart ( ) ) . EnsureModelPartOwnsProperties ( True ) # We create the submodelpart self . search_model_part = self . main_model_part . CreateSubModelPart ( "Contact" ) else : self . preprocess = False # We get the submodelpart self . search_model_part = self . main_model_part . GetSubModelPart ( "Contact" ) else : self . preprocess = True # We create the submodelpart self . search_model_part = self . main_model_part . CreateSubModelPart ( "Contact" ) # In case of no "Contact" model part we create it if self . preprocess : # In case no model part is assigned we detect the skin self . count_search_model_part = 0 for key in self . settings [ "search_model_part" ] . keys ( ) : if self . settings [ "search_model_part" ] [ key ] . size ( ) > 0 : self . count_search_model_part += 1 if self . count_search_model_part == 0 : self . __detect_skin ( self . main_model_part ) else : for key in self . settings [ "search_model_part" ] . keys ( ) : if self . settings [ "search_model_part" ] [ key ] . size ( ) > 0 : self . __generate_search_model_part_from_input_list ( self . settings [ "search_model_part" ] [ key ] , key ) # We compute NODAL_H that can be used in the search and some values computation self . find_nodal_h = KM . FindNodalHProcess ( self . main_model_part ) self . find_nodal_h . Execute ( ) # We check the normals normal_check_parameters = KM . Parameters ( """{"length_proportion" : 0.1}""" ) normal_check_parameters [ "length_proportion" ] . SetDouble ( self . settings [ "normal_check_proportion" ] . GetDouble ( ) ) check_normal_process = CSMA . NormalCheckProcess ( self . main_model_part , normal_check_parameters ) check_normal_process . Execute ( ) ## We recompute the search factor and the check in function of the relative size of the mesh if self . settings [ "search_parameters" ] [ "adapt_search" ] . GetBool ( ) : factor = CSMA . ContactUtilities . CalculateRelativeSizeMesh ( self . main_model_part ) KM . Logger . PrintWarning ( "SEARCH ADAPT FACTOR: " , "{:.2e}" . format ( factor ) ) search_factor = self . settings [ "search_parameters" ] [ "search_factor" ] . GetDouble ( ) * factor self . settings [ "search_parameters" ] [ "search_factor" ] . SetDouble ( search_factor ) active_check_factor = self . settings [ "search_parameters" ] [ "active_check_factor" ] . GetDouble ( ) * factor self . settings [ "search_parameters" ] [ "active_check_factor" ] . SetDouble ( active_check_factor ) # We call the process info self . _initialize_process_info ( ) #If the conditions doesn't exist we create them if self . preprocess is False : master_slave_process = CSMA . MasterSlaveProcess ( self . main_model_part ) master_slave_process . Execute ( ) # Setting the integration order and active check factor KM . AuxiliarModelPartUtilities ( self . _get_process_model_part ( ) ) . RecursiveEnsureModelPartOwnsProperties ( True ) for prop in self . _get_process_model_part ( ) . GetProperties ( ) : prop [ CSMA . INTEGRATION_ORDER_CONTACT ] = self . settings [ "integration_order" ] . GetInt ( ) prop [ CSMA . CONSIDER_TESSELLATION ] = self . settings [ "consider_tessellation" ] . GetBool ( ) # We initialize the contact values self . _initialize_search_values ( ) # We initialize some other process values self . _initialize_problem_parameters ( ) # Creating the search self . search_utility_list = { } for key in self . settings [ "search_model_part" ] . keys ( ) : if self . settings [ "search_model_part" ] [ key ] . size ( ) > 0 : self . _create_main_search ( key ) # We initialize conditions self . _initialize_search_conditions ( ) # We perform search initializations for key in self . settings [ "search_model_part" ] . keys ( ) : if self . settings [ "search_model_part" ] [ key ] . size ( ) > 0 : # We initialize the search utility self . search_utility_list [ key ] . ExecuteInitialize ( )