<reponame>lucasralves/steady-flow-prediction
import numpy as np
import abc

from src.pre_processing.core.distance.functions.calculate_distance_from_surface import calculate_distance_from_surface_func

##-------------------------------------------------------##
##                   ABSTRACT CLASS                      ##
##-------------------------------------------------------##
class DistanceFunctions(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def generate_distance() -> np.ndarray:
        pass

##-------------------------------------------------------##
##                 CLASS IMPLEMENTATION                  ##
##-------------------------------------------------------##
class DistanceFunctionsImpl(DistanceFunctions):

    def __init__(self,
                 surface: np.ndarray,
                 mesh: np.ndarray) -> None:
        self.surface: np.ndarray = surface
        self.mesh: np.ndarray = mesh
        super().__init__()
        return
    
    def generate_distance(self) -> np.ndarray:
        return calculate_distance_from_surface_func(surface=self.surface, mesh=self.mesh)
import numpy as np
import abc

from src.pre_processing.core.distance.functions.calculate_distance_from_surface import calculate_distance_from_surface_func

##-------------------------------------------------------##
##                   ABSTRACT CLASS                      ##
##-------------------------------------------------------##
class DistanceFunctions(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def generate_distance() -> np.ndarray:
        pass

##-------------------------------------------------------##
##                 CLASS IMPLEMENTATION                  ##
##-------------------------------------------------------##
class DistanceFunctionsImpl(DistanceFunctions):

    def __init__(self,
                 surface: np.ndarray,
                 mesh: np.ndarray) -> None:
        self.surface: np.ndarray = surface
        self.mesh: np.ndarray = mesh
        super().__init__()
        return
    
    def generate_distance(self) -> np.ndarray:
        return calculate_distance_from_surface_func(surface=self.surface, mesh=self.mesh)
##-------------------------------------------------------## ##                   ABSTRACT CLASS                      ## ##-------------------------------------------------------## ##-------------------------------------------------------## ##                 CLASS IMPLEMENTATION                  ## ##-------------------------------------------------------##