Source code for viiapackage.analyses.helper_functions.interface_elements

### ===================================================================================================================
###   _viia_find_interface_mesh_elements
### ===================================================================================================================
# Copyright ©VIIA 2024

### ===================================================================================================================
###   1. Import modules
### ===================================================================================================================

# General imports
from __future__ import annotations
from typing import TYPE_CHECKING

# References for functions and classes in the rhdhv_fem package
from rhdhv_fem.fem_tools import fem_remove_duplicates_from_list

# References for functions and classes in the viiaPackage
if TYPE_CHECKING:
    from viiapackage.viiaStatus import ViiaProject


### ===================================================================================================================
###   2. Function to get only the interface elements excluding the Flex-base boundary interface elements
### ===================================================================================================================

[docs]def viia_find_interface_mesh_elements(project: ViiaProject): """"This function is used to find the interface elements and nodes in the building""" interface_elem = [] interface_nodes = [] for interface in project.collections.interfaces: for element in interface.mesh.mesh_elements: interface_elem.append(element) interface_nodes.extend(element.mesh_nodes) interface_nodes = fem_remove_duplicates_from_list(items=interface_nodes) return interface_elem, interface_nodes
### =================================================================================================================== ### 3. End of script ### ===================================================================================================================