from typing import *
import numpy as np
import logging

logger = logging.getLogger(__name__)

class DirichletBC:
    def __init__(self, boundary_points:np.ndarray, boundary_values:np.ndarray):
        # dirichlet boundary condition imposed on discrete boundary points
        assert boundary_points.shape == boundary_values.shape[:-1], logger.error("number of boundary values has to match number of boundary points")

        self.boundary_points = boundary_points
        self.boundary_values = boundary_values

class IC:
    def __init__(self, nodal_points: np.ndarray, initial_values: np.ndarray):
        assert nodal_points.shape == initial_values.shape[:-1], logger.error("number of function values has to match number of nodal points")
        self.nodal_points = nodal_points
        self.initial_values = initial_values