Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
KiT-RT
KiT-RT
Commits
1952c219
Commit
1952c219
authored
Mar 15, 2021
by
Steffen Schotthöfer
Browse files
added d1 normalized datagenerator
parent
8acf866f
Pipeline
#141623
passed with stage
in 19 minutes and 49 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
code/input/DataGenerator1D.cfg
View file @
1952c219
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 1D Data Generator for %
% 1D Data Generator for %
% Neural Entropy Closure %
% Author <Steffen Schotthöfer>
%
% Author <Steffen Schotthöfer>
%
% Date 17.02.2021 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% ---- Datagenerator settings ----
DATA_GENERATOR_MODE = YES
TRAINING_SET_SIZE =
1
00
TRAINING_SET_SIZE =
20
00
MAX_VALUE_FIRST_MOMENT = 1
SPATIAL_DIM = 1
REALIZABLE_SET_EPSILON_U1 = 0.003
REALIZABLE_SET_EPSILON_U0 = 0.003
NORMALIZED_SAMPLING =
NO
MAX_MOMENT_SOLVER =
3
NORMALIZED_SAMPLING =
YES
MAX_MOMENT_SOLVER =
1
%
% ---- File specifications ----
%
%
% Output directory
OUTPUT_DIR = ../result
% Output file
...
...
@@ -45,7 +45,7 @@ NEWTON_STEP_SIZE = 0.7
NEWTON_LINE_SEARCH_ITER = 100000
%
% ----- Quadrature ----
%
%
% Quadrature Rule
QUAD_TYPE = GAUSS_LEGENDRE_1D
% Quadrature Order
...
...
code/src/toolboxes/datagenerator1D.cpp
View file @
1952c219
...
...
@@ -134,6 +134,18 @@ void DataGenerator1D::SampleSolutionU() {
}
}
else
if
(
_settings
->
GetSphericalBasisName
()
==
SPHERICAL_MONOMIALS
&&
_settings
->
GetNormalizedSampling
()
)
{
if
(
_LMaxDegree
==
1
)
{
// Carefull: This computes only normalized moments, i.e. sampling for u_0 = 1
unsigned
c
=
0
;
double
dN
=
2.0
/
(
double
)
_gridSize
;
double
N1
=
-
1.0
+
_settings
->
GetRealizableSetEpsilonU0
();
while
(
N1
<
1.0
-
_settings
->
GetRealizableSetEpsilonU0
()
)
{
_uSol
[
c
][
0
]
=
1
;
// u0 (normalized i.e. N0) by Monreals notation
_uSol
[
c
][
1
]
=
N1
;
// u1 (normalized i.e. N1) by Monreals notation
N1
+=
dN
;
c
++
;
}
}
if
(
_LMaxDegree
==
2
)
{
// Carefull: This computes only normalized moments, i.e. sampling for u_0 = 1
unsigned
c
=
0
;
...
...
@@ -234,8 +246,7 @@ void DataGenerator1D::ComputeSetSize() {
}
_setSize
=
c
;
}
else
if
(
_LMaxDegree
==
3
&&
_settings
->
GetSphericalBasisName
()
==
SPHERICAL_MONOMIALS
&&
!
_settings
->
GetNormalizedSampling
()
)
{
// Carefull: This computes only normalized moments, i.e. sampling for u_0 = 1
else
if
(
_LMaxDegree
==
3
)
{
unsigned
c
=
0
;
double
du
=
_settings
->
GetMaxValFirstMoment
()
/
(
double
)
_gridSize
;
double
u0
=
_settings
->
GetRealizableSetEpsilonU0
();
...
...
@@ -267,7 +278,18 @@ void DataGenerator1D::ComputeSetSize() {
}
}
else
if
(
_settings
->
GetSphericalBasisName
()
==
SPHERICAL_MONOMIALS
&&
_settings
->
GetNormalizedSampling
()
)
{
if
(
_LMaxDegree
==
2
)
{
if
(
_LMaxDegree
==
1
)
{
// Carefull: This computes only normalized moments, i.e. sampling for u_0 = 1
unsigned
c
=
0
;
double
dN
=
2.0
/
(
double
)
_gridSize
;
double
N1
=
-
1.0
+
_settings
->
GetRealizableSetEpsilonU0
();
while
(
N1
<
1.0
-
_settings
->
GetRealizableSetEpsilonU0
()
)
{
N1
+=
dN
;
c
++
;
}
_setSize
=
c
;
}
else
if
(
_LMaxDegree
==
2
)
{
// Carefull: This computes only normalized moments, i.e. sampling for u_0 = 1
unsigned
c
=
1
;
double
N1
=
-
1.0
+
_settings
->
GetRealizableSetEpsilonU0
();
...
...
jannick.wolters
@jm2154
mentioned in commit
a871b083
·
Apr 30, 2021
mentioned in commit
a871b083
mentioned in commit a871b08399e86f9837366171c580196c4486d65a
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment