Commit 8cd90597 authored by Steffen Schotthöfer's avatar Steffen Schotthöfer
Browse files

small fix in datagenderator for L =1


Former-commit-id: e2cf5ad9
parent 704e7772
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
% %
% ---- Global settings ---- % ---- Global settings ----
DATA_GENERATOR_MODE = YES DATA_GENERATOR_MODE = YES
TRAINING_SET_SIZE = 100000 TRAINING_SET_SIZE = 10
MAX_VALUE_FIRST_MOMENT = 10 MAX_VALUE_FIRST_MOMENT = 500
BOUNDARY_DISTANCE_REALIZABLE_SET = 0.01 BOUNDARY_DISTANCE_REALIZABLE_SET = 0.01
% %
% ---- File specifications ---- % ---- File specifications ----
......
...@@ -133,7 +133,7 @@ void nnDataGenerator::SampleSolutionU() { ...@@ -133,7 +133,7 @@ void nnDataGenerator::SampleSolutionU() {
// Use necessary conditions from Monreal, Dissertation, Chapter 3.2.1, Page 26 // Use necessary conditions from Monreal, Dissertation, Chapter 3.2.1, Page 26
// --- Determine stepsizes etc --- // --- Determine stepsizes etc ---
double du0 = _settings->GetMaxValFirstMoment() / (double)_setSize; double du0 = _settings->GetMaxValFirstMoment() / (double)_gridSize;
// different processes for different // different processes for different
if( _LMaxDegree == 0 ) { if( _LMaxDegree == 0 ) {
...@@ -260,7 +260,10 @@ void nnDataGenerator::CheckRealizability() { ...@@ -260,7 +260,10 @@ void nnDataGenerator::CheckRealizability() {
for( unsigned idx_set = 0; idx_set < _setSize; idx_set++ ) { for( unsigned idx_set = 0; idx_set < _setSize; idx_set++ ) {
if( _uSol[idx_set][0] < epsilon ) { if( _uSol[idx_set][0] < epsilon ) {
if( std::abs( _uSol[idx_set][1] ) > 0 || std::abs( _uSol[idx_set][2] ) > 0 || std::abs( _uSol[idx_set][3] ) > 0 ) { if( std::abs( _uSol[idx_set][1] ) > 0 || std::abs( _uSol[idx_set][2] ) > 0 || std::abs( _uSol[idx_set][3] ) > 0 ) {
ErrorMessages::Error( "Moment not realizable [code 0].", CURRENT_FUNCTION ); ErrorMessages::Error( "Moment not realizable [code 0]. Values: (" + std::to_string( _uSol[idx_set][0] ) + "|" +
std::to_string( _uSol[idx_set][1] ) + "|" + std::to_string( _uSol[idx_set][2] ) + "|" +
std::to_string( _uSol[idx_set][3] ) + ")",
CURRENT_FUNCTION );
} }
} }
else { else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment