Skip to content

Commit

Permalink
fix missing info logging to console, add result output hints
Browse files Browse the repository at this point in the history
  • Loading branch information
gituser789 committed Aug 24, 2024
1 parent 0aa8abc commit fa68069
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion femmt/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,12 @@ def __init__(self, simulation_type: SimulationType = SimulationType.FreqDomain,
# Variable to set silent mode
self.verbosity = verbosity
self.logger = logging.getLogger("FEMMTLogger")
logging.basicConfig(format='%(levelname)s,%(asctime)s:%(message)s', encoding='utf-8')
self.logger.setLevel(logging.INFO)
if not gmsh.isInitialized():
gmsh.initialize()

if not verbosity == Verbosity.ToConsole:
if verbosity != Verbosity.ToConsole:
gmsh.option.setNumber("General.Terminal", 0)
self.silent = True

Expand Down Expand Up @@ -347,6 +348,8 @@ def thermal_simulation(self, thermal_conductivity_dict: Dict, boundary_temperatu
}

thermal_simulation.run_thermal(**thermal_parameters)
self.femmt_print(f"The electromagnetic results are stored here: {self.file_data.e_m_results_log_path}")
self.femmt_print(f"The thermal results are stored here: {self.file_data.results_folder_path}/results_thermal.json")

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Setup
Expand Down Expand Up @@ -1401,6 +1404,7 @@ def single_simulation(self, freq: float, current: List[float], phi_deg: List[flo
self.log_reluctance_calculations()
if show_fem_simulation_results:
self.visualize()
self.femmt_print(f"The electromagnetic results are stored here: {self.file_data.e_m_results_log_path}")

def time_domain_simulation(self, current_period_vec: List[List[float]], time_period_vec: List[float],
number_of_periods: int,
Expand Down

0 comments on commit fa68069

Please sign in to comment.