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
6bd89c3d
Commit
6bd89c3d
authored
Apr 14, 2021
by
Steffen Schotthöfer
Browse files
removed basis reduction
Former-commit-id:
dceec721
parent
0bc4098c
Changes
2
Hide whitespace changes
Inline
Side-by-side
neuralEntropy
@
c17aef38
Subproject commit c17aef38149a57d92781c91643375fd891d2a4cb
code/src/toolboxes/datagenerator1D.cpp
View file @
6bd89c3d
...
...
@@ -16,7 +16,7 @@
DataGenerator1D
::
DataGenerator1D
(
Config
*
settings
)
:
DataGeneratorBase
(
settings
)
{
ComputeMoments
();
AdaptBasisSize
();
//
AdaptBasisSize();
// Initialize Training Data
ComputeSetSize
();
...
...
@@ -142,8 +142,8 @@ void DataGenerator1D::SampleSolutionU() {
double
dN
=
2.0
/
(
double
)
_gridSize
;
double
N1
=
-
1.0
+
_settings
->
GetRealizableSetEpsilonU0
();
while
(
N1
<
1.0
-
_settings
->
GetRealizableSetEpsilonU0
()
)
{
_uSol
[
c
][
0
]
=
N1
;
// u1 (normalized i.e. N1) by Monreals notation
_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
++
;
}
...
...
@@ -157,8 +157,9 @@ void DataGenerator1D::SampleSolutionU() {
while
(
N1
<
1.0
-
_settings
->
GetRealizableSetEpsilonU0
()
)
{
N2
=
N1
*
N1
+
_settings
->
GetRealizableSetEpsilonU0
();
while
(
N2
<
1.0
-
_settings
->
GetRealizableSetEpsilonU0
()
)
{
_uSol
[
c
][
0
]
=
N1
;
// u1 (normalized i.e. N1) by Monreals notation
_uSol
[
c
][
1
]
=
N2
;
// u2 (normalized i.e. N2) by Monreals notation
_uSol
[
c
][
0
]
=
1
;
// u0 (normalized i.e. N0) by Monreals notation
_uSol
[
c
][
1
]
=
N1
;
// u1 (normalized i.e. N1) by Monreals notation
_uSol
[
c
][
2
]
=
N2
;
// u2 (normalized i.e. N2) by Monreals notation
N2
+=
dN
;
c
++
;
}
...
...
@@ -175,9 +176,10 @@ void DataGenerator1D::SampleSolutionU() {
while
(
N2
<
1.0
-
_settings
->
GetRealizableSetEpsilonU0
()
)
{
N3
=
-
N2
+
(
N1
+
N2
)
*
(
N1
+
N2
)
/
(
1
+
N1
)
+
_settings
->
GetRealizableSetEpsilonU1
();
while
(
N3
<
N2
-
(
N1
-
N2
)
*
(
N1
-
N2
)
/
(
1
-
N1
)
-
_settings
->
GetRealizableSetEpsilonU1
()
)
{
_uSol
[
c
][
0
]
=
N1
;
// u1 by Monreals notation
_uSol
[
c
][
1
]
=
N2
;
// u2 by Monreals notation
_uSol
[
c
][
2
]
=
N3
;
// u3 by Monreals notation
_uSol
[
c
][
0
]
=
1
;
// u0 by Monreals notation
_uSol
[
c
][
1
]
=
N1
;
// u1 by Monreals notation
_uSol
[
c
][
2
]
=
N2
;
// u2 by Monreals notation
_uSol
[
c
][
3
]
=
N3
;
// u3 by Monreals notation
c
++
;
N3
+=
dN
;
}
...
...
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