From 4e74a353ce54ac209966caededce958babe7bcb2 Mon Sep 17 00:00:00 2001 From: ScSteffen Date: Tue, 2 Jan 2024 11:54:53 -0500 Subject: [PATCH 1/3] repaired lattice geo file --- examples/meshes/geo_files/lattice_refined.geo | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/examples/meshes/geo_files/lattice_refined.geo b/examples/meshes/geo_files/lattice_refined.geo index dea72d8f..0f4557bb 100644 --- a/examples/meshes/geo_files/lattice_refined.geo +++ b/examples/meshes/geo_files/lattice_refined.geo @@ -1,10 +1,12 @@ cl_fine = 0.02; -cl_coarse = 0.2; -length = 0.05; -Point(1) = {-3.5, -3.5, 0, cl_coarse}; -Point(2) = {3.5, -3.5, 0, cl_coarse}; -Point(3) = {-3.5, 3.5, 0, cl_coarse}; -Point(4) = {3.5, 3.5, 0, cl_coarse}; +cl_coarse = 0.075; +cl_boundary = 0.2; +length = 0.075; +length = 0.075; +Point(1) = {-3.5, -3.5, 0, cl_boundary}; +Point(2) = {3.5, -3.5, 0, cl_boundary}; +Point(3) = {-3.5, 3.5, 0, cl_boundary}; +Point(4) = {3.5, 3.5, 0, cl_boundary}; Point(5) = {-1.5, -1.5, 0, cl_fine}; Point(6) = {-2.5, -1.5, 0, cl_fine}; Point(7) = {-2.5, -2.5, 0, cl_fine}; From 49c69673c6f972c6ea723dbdc3e01a91aace8cd2 Mon Sep 17 00:00:00 2001 From: ScSteffen Date: Tue, 2 Jan 2024 11:55:43 -0500 Subject: [PATCH 2/3] fixed geo file --- examples/meshes/geo_files/lattice_refined.geo | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/meshes/geo_files/lattice_refined.geo b/examples/meshes/geo_files/lattice_refined.geo index 0f4557bb..a3ee2a81 100644 --- a/examples/meshes/geo_files/lattice_refined.geo +++ b/examples/meshes/geo_files/lattice_refined.geo @@ -2,7 +2,6 @@ cl_fine = 0.02; cl_coarse = 0.075; cl_boundary = 0.2; length = 0.075; -length = 0.075; Point(1) = {-3.5, -3.5, 0, cl_boundary}; Point(2) = {3.5, -3.5, 0, cl_boundary}; Point(3) = {-3.5, 3.5, 0, cl_boundary}; From 180f0503e4df72048ed390b2002925c6342e50ef Mon Sep 17 00:00:00 2001 From: ScSteffen Date: Tue, 2 Jan 2024 11:59:05 -0500 Subject: [PATCH 3/3] adapted cascade file --- examples/cascade_lattice.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/cascade_lattice.py b/examples/cascade_lattice.py index 8493076d..b423dc81 100644 --- a/examples/cascade_lattice.py +++ b/examples/cascade_lattice.py @@ -5,12 +5,12 @@ def main(): # Example usage: quad_order = 19 - cl_fine_vals = [0.02, 0.01, 0.005] + cl_fine_vals = [0.05, 0.02, 0.01, 0.005] cl_coarse = 0.075 cl_boundary = 0.2 length = 0.075 - for i in range(3): + for i in range(len(cl_fine_vals)): cl_fine = cl_fine_vals[i] modify_and_run_geo_file( cl_fine=cl_fine, cl_coarse=cl_coarse, cl_boundary=cl_boundary, length=length @@ -79,6 +79,7 @@ def modify_and_save_log_file(quad_order, cl_fine, cl_coarse, cl_boundary, length # Identify the lines containing "LOG_DIR" and "LOG_FILE" log_dir_line = next(line for line in lines if "LOG_DIR" in line) log_file_line = next(line for line in lines if "LOG_FILE" in line) + vtk_file_line = next(line for line in lines if "OUTPUT_FILE" in line) print(log_file_line) # Extract the current log directory and file name @@ -87,10 +88,13 @@ def modify_and_save_log_file(quad_order, cl_fine, cl_coarse, cl_boundary, length # Construct the new log file name new_log_file = f"lattice_quad_order_{quad_order}_cl_fine_{cl_fine}_cl_coarse_{cl_coarse}_cl_boundary_{cl_boundary}_length_{length}" + new_vtk_file = f"lattice_quad_order_{quad_order}_cl_fine_{cl_fine}_cl_coarse_{cl_coarse}_cl_boundary_{cl_boundary}_length_{length}" # Update the log file name in the lines list log_file_line_new = f"LOG_FILE = {new_log_file}\n" + vtk_file_line_new = f"OUTPUT_FILE = {new_vtk_file}\n" lines[lines.index(log_file_line)] = log_file_line_new + lines[lines.index(vtk_file_line)] = vtk_file_line_new # Save the modified lattice.cfg file with open(cfg_file_path, "w") as file: