diff --git a/.github/workflows/configure_research_applications.sh b/.github/workflows/configure_research_applications.sh index 298b1c83846e..af551ff4b5b8 100644 --- a/.github/workflows/configure_research_applications.sh +++ b/.github/workflows/configure_research_applications.sh @@ -40,6 +40,7 @@ add_app ${KRATOS_APP_DIR}/RANSApplication; add_app ${KRATOS_APP_DIR}/ShallowWaterApplication; add_app ${KRATOS_APP_DIR}/ShapeOptimizationApplication; add_app ${KRATOS_APP_DIR}/SwimmingDEMApplication; +add_app ${KRATOS_APP_DIR}/SystemIdentificationApplication; # Clean clear diff --git a/applications/SystemIdentificationApplication/custom_sensors/sensor_view.cpp b/applications/SystemIdentificationApplication/custom_sensors/sensor_view.cpp index eb04b41469c5..cbbaef6687ff 100644 --- a/applications/SystemIdentificationApplication/custom_sensors/sensor_view.cpp +++ b/applications/SystemIdentificationApplication/custom_sensors/sensor_view.cpp @@ -142,8 +142,8 @@ void SensorView::PrintData(std::ostream& rOStream) const } // template insantiations -template KRATOS_API(SYSTEM_IDENTIFICATION_APPLICATION) class SensorView; -template KRATOS_API(SYSTEM_IDENTIFICATION_APPLICATION) class SensorView; -template KRATOS_API(SYSTEM_IDENTIFICATION_APPLICATION) class SensorView; +template class SensorView; +template class SensorView; +template class SensorView; } /* namespace Kratos.*/ \ No newline at end of file diff --git a/applications/SystemIdentificationApplication/custom_utilities/smooth_clamper.cpp b/applications/SystemIdentificationApplication/custom_utilities/smooth_clamper.cpp index 692ec9bf0219..b8b1459caea2 100644 --- a/applications/SystemIdentificationApplication/custom_utilities/smooth_clamper.cpp +++ b/applications/SystemIdentificationApplication/custom_utilities/smooth_clamper.cpp @@ -87,7 +87,6 @@ ContainerExpression SmoothClamper::CalculateForw // y = 3x^2 - 2x^3 // dy/dx = 3.2.x - 2.3.x^2 - const auto min = mMin; const auto delta = mMax - mMin; const auto& r_input_exp = rInput.GetExpression(); const auto number_of_entities = r_input_exp.NumberOfEntities(); @@ -98,7 +97,7 @@ ContainerExpression SmoothClamper::CalculateForw auto p_result_exp = LiteralFlatExpression::Create(number_of_entities, {}); - IndexPartition(number_of_entities).for_each([&p_result_exp, &r_input_exp, min, delta](const auto Index) { + IndexPartition(number_of_entities).for_each([&p_result_exp, &r_input_exp, delta](const auto Index) { const double x = r_input_exp.Evaluate(Index, Index, 0); double& value = *(p_result_exp->begin() + Index); if (x < 0.0) { @@ -156,8 +155,8 @@ ContainerExpression SmoothClamper::ProjectBackwa // template instantiations -template KRATOS_API(SYSTEM_IDENTIFICATION_APPLICATION) class SmoothClamper; -template KRATOS_API(SYSTEM_IDENTIFICATION_APPLICATION) class SmoothClamper; -template KRATOS_API(SYSTEM_IDENTIFICATION_APPLICATION) class SmoothClamper; +template class SmoothClamper; +template class SmoothClamper; +template class SmoothClamper; } /* namespace Kratos.*/ \ No newline at end of file diff --git a/applications/SystemIdentificationApplication/tests/auxiliary_files/system_identification/optimization_parameters.json b/applications/SystemIdentificationApplication/tests/auxiliary_files/system_identification/optimization_parameters.json index 3b146e15bf00..39394202ba22 100644 --- a/applications/SystemIdentificationApplication/tests/auxiliary_files/system_identification/optimization_parameters.json +++ b/applications/SystemIdentificationApplication/tests/auxiliary_files/system_identification/optimization_parameters.json @@ -124,7 +124,11 @@ "settings": { "output_file_name": "auxiliary_files/summary.csv", "write_kratos_version": false, - "write_time_stamp": false + "write_time_stamp": false, + "write_initial_values": false, + "list_of_output_components": [ + "response_function.damage_response" + ] } } ] diff --git a/applications/SystemIdentificationApplication/tests/auxiliary_files/system_identification_p_norm/optimization_parameters.json b/applications/SystemIdentificationApplication/tests/auxiliary_files/system_identification_p_norm/optimization_parameters.json index b2903ff8c6a0..3a64a4e0a42a 100644 --- a/applications/SystemIdentificationApplication/tests/auxiliary_files/system_identification_p_norm/optimization_parameters.json +++ b/applications/SystemIdentificationApplication/tests/auxiliary_files/system_identification_p_norm/optimization_parameters.json @@ -124,7 +124,11 @@ "settings": { "output_file_name": "auxiliary_files/summary_p_norm.csv", "write_kratos_version": false, - "write_time_stamp": false + "write_time_stamp": false, + "write_initial_values": false, + "list_of_output_components": [ + "response_function.damage_response" + ] } } ] diff --git a/applications/SystemIdentificationApplication/tests/auxiliary_files/system_identification_p_norm_summary_ref.csv b/applications/SystemIdentificationApplication/tests/auxiliary_files/system_identification_p_norm_summary_ref.csv index 13a44fc9fe69..beea8b7947ae 100644 --- a/applications/SystemIdentificationApplication/tests/auxiliary_files/system_identification_p_norm_summary_ref.csv +++ b/applications/SystemIdentificationApplication/tests/auxiliary_files/system_identification_p_norm_summary_ref.csv @@ -2,19 +2,13 @@ # Kratos version: not_given # Timestamp : not_specified # ----------------------------------------------- -# --------------- Initial values ---------------- -# algorithm: -# damage_response: -# initial_value: 2.148297976e-04 -# ------------ End of initial values ------------ -# ----------------------------------------------- # ------------ Start of step values ------------- # Headers: -# STEP, algorithm:std_obj_value, algorithm:rel_obj[%], algorithm:abs_obj[%], damage_response:value - 0, 2.148297976e-04, 0.000000000e+00, 0.000000000e+00, 2.148297976e-04 - 1, 2.050244372e-04, -4.564245970e+00, -4.564245970e+00, 2.050244372e-04 - 2, 1.955625237e-04, -4.615017463e+00, -8.968622685e+00, 1.955625237e-04 - 3, 1.864375960e-04, -4.665989922e+00, -1.321613758e+01, 1.864375960e-04 - 4, 1.776430951e-04, -4.717128485e+00, -1.730984387e+01, 1.776430951e-04 - 5, 1.691723537e-04, -4.768404519e+00, -2.125284501e+01, 1.691723537e-04 +# STEP, damage_response:value + 0, 2.148297976e-04 + 1, 2.050244371e-04 + 2, 1.955625238e-04 + 3, 1.864375950e-04 + 4, 1.776430946e-04 + 5, 1.691723531e-04 # End of file \ No newline at end of file diff --git a/applications/SystemIdentificationApplication/tests/auxiliary_files/system_identification_summary_ref.csv b/applications/SystemIdentificationApplication/tests/auxiliary_files/system_identification_summary_ref.csv index 371789691a66..fe5c5caa957b 100644 --- a/applications/SystemIdentificationApplication/tests/auxiliary_files/system_identification_summary_ref.csv +++ b/applications/SystemIdentificationApplication/tests/auxiliary_files/system_identification_summary_ref.csv @@ -2,19 +2,13 @@ # Kratos version: not_given # Timestamp : not_specified # ----------------------------------------------- -# --------------- Initial values ---------------- -# algorithm: -# damage_response: -# initial_value: 7.924977798e-04 -# ------------ End of initial values ------------ -# ----------------------------------------------- # ------------ Start of step values ------------- # Headers: -# STEP, algorithm:std_obj_value, algorithm:rel_obj[%], algorithm:abs_obj[%], damage_response:value - 0, 7.924977798e-04, 0.000000000e+00, 0.000000000e+00, 7.924977798e-04 - 1, 7.578660738e-04, -4.369943603e+00, -4.369943603e+00, 7.578660738e-04 - 2, 7.244679929e-04, -4.406857889e+00, -8.584224288e+00, 7.244679929e-04 - 3, 6.922659728e-04, -4.444919640e+00, -1.264758206e+01, 6.922659728e-04 - 4, 6.612241562e-04, -4.484088173e+00, -1.656454150e+01, 6.612241562e-04 - 5, 6.313082940e-04, -4.524314774e+00, -2.033942428e+01, 6.313082940e-04 +# STEP, damage_response:value + 0, 7.924977798e-04 + 1, 7.578660739e-04 + 2, 7.244679939e-04 + 3, 6.922659760e-04 + 4, 6.612241591e-04 + 5, 6.313082973e-04 # End of file \ No newline at end of file diff --git a/applications/SystemIdentificationApplication/tests/test_system_identification.py b/applications/SystemIdentificationApplication/tests/test_system_identification.py index 1ea3f43da52c..7518810c406b 100644 --- a/applications/SystemIdentificationApplication/tests/test_system_identification.py +++ b/applications/SystemIdentificationApplication/tests/test_system_identification.py @@ -33,8 +33,8 @@ def test_SystemIdentification(self): "output_file_name" : "auxiliary_files/summary.csv", "remove_output_file" : true, "comparison_type" : "csv_file", - "tolerance" : 1e-2, - "relative_tolerance" : 1e-3, + "tolerance" : 1e-6, + "relative_tolerance" : 1e-6, "dimension" : 3 }""") CompareTwoFilesCheckProcess(params).Execute() @@ -52,8 +52,8 @@ def test_SystemIdentificationPNorm(self): "output_file_name" : "auxiliary_files/summary_p_norm.csv", "remove_output_file" : true, "comparison_type" : "csv_file", - "tolerance" : 1e-2, - "relative_tolerance" : 1e-3, + "tolerance" : 1e-6, + "relative_tolerance" : 1e-6, "dimension" : 3 }""") CompareTwoFilesCheckProcess(params).Execute()