Commit 81cfe1f8 authored by Baptiste Durand's avatar Baptiste Durand

Remove unnecessary logger `bndry_logger`

parent a602c019
......@@ -8,36 +8,11 @@ Objects designed to represent geometrical entitites of dimension one
and instantiate them in a gmsh model.
"""
import logging
import warnings
from logging.handlers import RotatingFileHandler
from pathlib import Path
from . import factory, logger, model, np, plt
from .point import Point
bndry_logger = logging.getLogger("bndry")
bndry_logger.setLevel(logging.DEBUG)
bndry_logger.propagate = False
log_path = Path("~/ho_homog_log/gmsh_getBoundary_output.log").expanduser()
if not log_path.parent.exists():
log_path.parent.mkdir(mode=0o777, parents=True)
file_handler = RotatingFileHandler(str(log_path), "a", 1000000, 1)
file_handler.setLevel(logging.DEBUG)
file_handler.setFormatter(
logging.Formatter("%(asctime)s :: %(levelname)s :: %(message)s")
)
bndry_logger.addHandler(file_handler)
bndry_logger.warning("***Output of the getBoundary function of the gmsh API***")
bndry_logger.warning(
"""
*****
This logger and the associated handler are a hacky workaround to avoid errors
related to gmsh.model.occ.getBoundary(). Therefore they should not be removed
or deactivated.
*****"""
)
class Curve(object):
"""Superclass that is used to define the other classes : Line, Arc and AbstractCurve.
......@@ -85,7 +60,7 @@ class Curve(object):
# ? return self.__tag
def reverse(self):
""" Peut-être utile au moment de définir les contraites de périodicité.
"""Peut-être utile au moment de définir les contraites de périodicité.
# TODO À tester !!!
"""
self.def_pts.reverse()
......@@ -130,7 +105,7 @@ class Arc(Curve):
"""
def __init__(self, start_pt, center_pt, end_pt):
""" Crée un arc de cercle.
"""Crée un arc de cercle.
Vérification préalable de l'égalité des distances centre<->extrémités.
"""
......@@ -206,11 +181,7 @@ class AbstractCurve(Curve):
If true, les coordonnées des points extrémités sont aussi récupérés.
"""
bndry_logger.debug(f"Abstract Curve -> get_boundary. self.tag : {self.tag}")
def_pts = []
bndry_logger.debug(
f"Abstract Curve -> get_boundary. raw API return : {boundary}"
)
boundary = model.getBoundary([(1, self.tag)], False, False, False)
for pt_dimtag in boundary:
if not pt_dimtag[0] == 0:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment