Skip to content
Snippets Groups Projects
Commit 0c3ee611 authored by Laura Christine Kühle's avatar Laura Christine Kühle
Browse files

Removed option to choose training domain.

parent 00e65c21
No related branches found
No related tags found
No related merge requests found
......@@ -33,22 +33,13 @@ class TrainingDataGenerator:
Builds random training data.
"""
def __init__(self, left_bound=-1, right_bound=1):
"""Initializes TrainingDataGenerator.
Parameters
----------
left_bound : float, optional
Left boundary of interval. Default: -1.
right_bound : float, optional
Right boundary of interval. Default: 1.
"""
def __init__(self):
"""Initializes TrainingDataGenerator."""
self._basis_list = [OrthonormalLegendre(pol_deg)
for pol_deg in range(7)]
self._quadrature_list = [Gauss({'num_nodes': pol_deg+1})
for pol_deg in range(7)]
self._mesh_list = [Mesh(left_bound=left_bound, right_bound=right_bound,
self._mesh_list = [Mesh(left_bound=-1, right_bound=1,
num_ghost_cells=0, num_cells=2**exp)
for exp in range(5, 12)]
......
data_dir: 'Oct03'
data_dir: 'Oct04'
random_seed: 1234
# Parameter for Approximation with Troubled Cell Detection
......@@ -49,9 +49,6 @@ Approximation:
ANN_Data:
sample_number: 100
left_boundary: -1
right_boundary: 1
smooth_troubled_balance: 0.5
stencil_length: 3
......
......@@ -17,8 +17,6 @@ rule generate_data:
protected(DIR+'/output_data.npy')
default_target: True
params:
left_bound = config['left_boundary'],
right_bound = config['right_boundary'],
balance = config['smooth_troubled_balance'],
stencil_len = config['stencil_length'],
sample_number = config['sample_number'],
......@@ -37,8 +35,7 @@ rule generate_data:
with open(str(log), 'w') as logfile:
sys.stdout = logfile
generator = ANN_Data_Generator.TrainingDataGenerator(
left_bound=params.left_bound, right_bound=params.right_bound)
generator = ANN_Data_Generator.TrainingDataGenerator()
data = generator.build_training_data(balance=params.balance,
init_cond_list=init_cond_list, directory=DIR,
num_samples=params.sample_number,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment