def Initialize(self): super(Pfem2PrimitiveVarSolver, self).Initialize() # Initializing the neighbour search domain_size = self.main_model_part.ProcessInfo[ KratosMultiphysics.DOMAIN_SIZE] number_of_avg_elems = 10 number_of_avg_nodes = 10 self.neighbour_search = KratosMultiphysics.FindNodalNeighboursProcess( self.main_model_part, number_of_avg_elems, number_of_avg_nodes) self.neighbour_search.Execute() self.neighbour_elements_search = KratosMultiphysics.FindElementalNeighboursProcess( self.main_model_part, domain_size, number_of_avg_elems) self.neighbour_elements_search.Execute() # Creating the solution strategy for the particle stage self.moveparticles = Shallow.MoveShallowWaterParticleUtility( self.main_model_part, self.settings["pfem2_settings"]) self.moveparticles.MountBin() self.print_on_rank_zero("::[Pfem2PrimitiveVarSolver]::", "Pfem2 stage initialization finished")
def Initialize(self): super(Pfem2PrimitiveVarSolver, self).Initialize() # Initializing the neighbour search domain_size = self.main_model_part.ProcessInfo[KM.DOMAIN_SIZE] number_of_avg_elems = 10 number_of_avg_nodes = 10 self.neighbour_search = KM.FindNodalNeighboursProcess( self.main_model_part, number_of_avg_elems, number_of_avg_nodes) self.neighbour_search.Execute() self.neighbour_elements_search = KM.FindElementalNeighboursProcess( self.main_model_part, domain_size, number_of_avg_elems) self.neighbour_elements_search.Execute() # Creating the solution strategy for the particle stage self.moveparticles = SW.MoveShallowWaterParticleUtility( self.main_model_part, self.settings["pfem2_settings"]) self.moveparticles.MountBin() if self.print_particles: self.moveparticles.ExecuteParticlesPrintingTool( self.lagrangian_model_part, self.filter_factor) KM.Logger.PrintInfo("::[Pfem2PrimitiveVarSolver]::", "Pfem2 stage initialization finished")