@classmethod
def from_dict(cls, data, sub_face=False):
    """Initialize Surface BoundaryCondition from a dictionary.

        Args:
            data: A dictionary representation of the boundary condition.
            sub_face: Boolean to note whether this boundary condition is applied to a
                sub-face (an Aperture or a Door) instead of a Face. Default: False.
        """
    assert data['type'
        ] == 'Surface', 'Expected dictionary for Surface boundary condition. Got {}.'.format(
        data['type'])
    return cls(data['boundary_condition_objects'], sub_face)
