Exemple #1
0
    def ExecuteBeforeSolutionLoop(self):
        dimension = self.model_part.ProcessInfo[KM.DOMAIN_SIZE]
        num_of_avg_elems = 10
        num_of_avg_nodes = 10
        neighbor_search = KM.FindNodalNeighboursProcess(self.model_part)
        neighbor_search.Execute()
        neighbor_elements_search = KM.FindElementalNeighboursProcess(
            self.model_part, dimension, num_of_avg_elems)
        neighbor_elements_search.Execute()

        max_num_of_particles = 8 * dimension
        if dimension == 2:
            self.moveparticles = PFEM2.MoveParticleUtilityPFEM22D(
                self.model_part, max_num_of_particles)
        else:
            self.moveparticles = PFEM2.MoveParticleUtilityPFEM23D(
                self.model_part, max_num_of_particles)
        self.moveparticles.MountBin()

        if self.print_particles:
            self.moveparticles.ExecuteParticlesPritingTool(
                self.lagrangian_model_part, self.filter_factor)

        self.initial_water_volume = self._get_water_volume_utility().Calculate(
        )
Exemple #2
0
    def ExecuteBeforeSolutionLoop(self):
        num_of_avg_elems = 10
        num_of_avg_nodes = 10
        neighbour_search = KratosMultiphysics.FindNodalNeighboursProcess(self.model_part, num_of_avg_elems, num_of_avg_nodes)
        neighbour_search.Execute()
        neighbour_elements_search = KratosMultiphysics.FindElementalNeighboursProcess(self.model_part, self.dimension, num_of_avg_elems)
        neighbour_elements_search.Execute()

        if self.dimension == 2:
            self.moveparticles = Pfem2.MoveParticleUtilityPFEM22D(self.model_part, self.max_num_of_particles)
        else:
            self.moveparticles = Pfem2.MoveParticleUtilityPFEM23D(self.model_part, self.max_num_of_particles)
        self.moveparticles.MountBin()