Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Troubled Cell Detection
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Laura Christine Kühle
Troubled Cell Detection
Commits
0c3ee611
Commit
0c3ee611
authored
2 years ago
by
Laura Christine Kühle
Browse files
Options
Downloads
Patches
Plain Diff
Removed option to choose training domain.
parent
00e65c21
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
ANN_Data_Generator.py
+3
-12
3 additions, 12 deletions
ANN_Data_Generator.py
config.yaml
+1
-4
1 addition, 4 deletions
config.yaml
workflows/ANN_data.smk
+1
-4
1 addition, 4 deletions
workflows/ANN_data.smk
with
5 additions
and
20 deletions
ANN_Data_Generator.py
+
3
−
12
View file @
0c3ee611
...
@@ -33,22 +33,13 @@ class TrainingDataGenerator:
...
@@ -33,22 +33,13 @@ class TrainingDataGenerator:
Builds random training data.
Builds random training data.
"""
"""
def
__init__
(
self
,
left_bound
=-
1
,
right_bound
=
1
):
def
__init__
(
self
):
"""
Initializes TrainingDataGenerator.
"""
Initializes TrainingDataGenerator.
"""
Parameters
----------
left_bound : float, optional
Left boundary of interval. Default: -1.
right_bound : float, optional
Right boundary of interval. Default: 1.
"""
self
.
_basis_list
=
[
OrthonormalLegendre
(
pol_deg
)
self
.
_basis_list
=
[
OrthonormalLegendre
(
pol_deg
)
for
pol_deg
in
range
(
7
)]
for
pol_deg
in
range
(
7
)]
self
.
_quadrature_list
=
[
Gauss
({
'
num_nodes
'
:
pol_deg
+
1
})
self
.
_quadrature_list
=
[
Gauss
({
'
num_nodes
'
:
pol_deg
+
1
})
for
pol_deg
in
range
(
7
)]
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
)
num_ghost_cells
=
0
,
num_cells
=
2
**
exp
)
for
exp
in
range
(
5
,
12
)]
for
exp
in
range
(
5
,
12
)]
...
...
This diff is collapsed.
Click to expand it.
config.yaml
+
1
−
4
View file @
0c3ee611
data_dir
:
'
Oct0
3
'
data_dir
:
'
Oct0
4
'
random_seed
:
1234
random_seed
:
1234
# Parameter for Approximation with Troubled Cell Detection
# Parameter for Approximation with Troubled Cell Detection
...
@@ -49,9 +49,6 @@ Approximation:
...
@@ -49,9 +49,6 @@ Approximation:
ANN_Data
:
ANN_Data
:
sample_number
:
100
sample_number
:
100
left_boundary
:
-1
right_boundary
:
1
smooth_troubled_balance
:
0.5
smooth_troubled_balance
:
0.5
stencil_length
:
3
stencil_length
:
3
...
...
This diff is collapsed.
Click to expand it.
workflows/ANN_data.smk
+
1
−
4
View file @
0c3ee611
...
@@ -17,8 +17,6 @@ rule generate_data:
...
@@ -17,8 +17,6 @@ rule generate_data:
protected(DIR+'/output_data.npy')
protected(DIR+'/output_data.npy')
default_target: True
default_target: True
params:
params:
left_bound = config['left_boundary'],
right_bound = config['right_boundary'],
balance = config['smooth_troubled_balance'],
balance = config['smooth_troubled_balance'],
stencil_len = config['stencil_length'],
stencil_len = config['stencil_length'],
sample_number = config['sample_number'],
sample_number = config['sample_number'],
...
@@ -37,8 +35,7 @@ rule generate_data:
...
@@ -37,8 +35,7 @@ rule generate_data:
with open(str(log), 'w') as logfile:
with open(str(log), 'w') as logfile:
sys.stdout = logfile
sys.stdout = logfile
generator = ANN_Data_Generator.TrainingDataGenerator(
generator = ANN_Data_Generator.TrainingDataGenerator()
left_bound=params.left_bound, right_bound=params.right_bound)
data = generator.build_training_data(balance=params.balance,
data = generator.build_training_data(balance=params.balance,
init_cond_list=init_cond_list, directory=DIR,
init_cond_list=init_cond_list, directory=DIR,
num_samples=params.sample_number,
num_samples=params.sample_number,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment