示例#1
0
    def SetPostMeshingProcesses(self):

        # The order set is the order of execution:
        if(self.echo_level>0):
            print("::[fluid_mesher]:: -START SetPostMeshingProcesses-")

        #select mesh elements
        select_mesh_elements  = KratosPfemFluid.SelectMeshElementsForFluids(self.model_part, self.MeshingParameters, self.echo_level)
        self.mesher.SetPostMeshingProcess(select_mesh_elements)
        #rebuild elements
        #rebuild_mesh_elements = KratosDelaunay.BuildMeshElements(self.main_model_part, self.MeshingParameters, self.echo_level)
        #self.mesher.SetPostMeshingProcess(rebuild_mesh_elements)

        #rebuild elements
        rebuild_mesh_elements = KratosDelaunay.GenerateNewElements(self.model_part, self.MeshingParameters, self.echo_level)
        self.mesher.SetPostMeshingProcess(rebuild_mesh_elements)

        ### rebuild boundary
        ############ choose just one of the following two options: ############
        ## use this if you want conditions
        ## ATTENTION: this is slow, and must be used together with ModelMeshingWithConditionsForFluids and BuildModelPartBoundary
        #rebuild_mesh_boundary = KratosPfemFluid.GenerateNewConditionsForFluids(self.model_part, self.MeshingParameters, self.echo_level)
        ## if you use the following, you will not use/build/compute conditions
        ## ATTENTION: it must be used together with ModelMeshingForFluids and BuildModelPartBoundaryForFluids
        rebuild_mesh_boundary = KratosPfemFluid.BuildMeshBoundaryForFluids(self.model_part, self.MeshingParameters, self.echo_level)
        #######################################################################
        self.mesher.SetPostMeshingProcess(rebuild_mesh_boundary)
    def SetPostMeshingProcesses(self):

        # The order set is the order of execution:
        if(self.echo_level>0):
            print("::[fluid_mesher]:: -START SetPostMeshingProcesses-")

        rebuild_mesh_boundary = KratosPfemFluid.BuildMeshBoundaryForFluids(self.model_part, self.MeshingParameters, self.echo_level)
        self.mesher.SetPostMeshingProcess(rebuild_mesh_boundary)
    def BuildMeshBoundaryForFluids(self):

        print("::[Modeler_Utility]:: Build Mesh Boundary for fluids ")
        # set building options:
        mesh_id = 0

        # define building utility
        skin_build = KratosPfemFluid.BuildMeshBoundaryForFluids(self.model_part, self.echo_level, mesh_id)
 
        # execute building:
        skin_build.Execute()

        print("::[Modeler_Utility]:: Mesh Boundary Build executed ")
    def SetPostMeshingProcesses(self):

        # The order set is the order of execution:
        if (self.echo_level > 0):
            print("::[fluid_mesher]:: -START SetPostMeshingProcesses-")

        #select mesh elements
        select_mesh_elements = KratosPfemFluid.SelectMeshElementsForFluids(
            self.model_part, self.MeshingParameters, self.echo_level)
        self.mesher.SetPostMeshingProcess(select_mesh_elements)

        #rebuild elements
        rebuild_mesh_elements = KratosDelaunay.GenerateNewElements(
            self.model_part, self.MeshingParameters, self.echo_level)
        self.mesher.SetPostMeshingProcess(rebuild_mesh_elements)

        rebuild_mesh_boundary = KratosPfemFluid.BuildMeshBoundaryForFluids(
            self.model_part, self.MeshingParameters, self.echo_level)
        self.mesher.SetPostMeshingProcess(rebuild_mesh_boundary)