Skip to content

Commit

Permalink
Merge pull request #12854 from KratosMultiphysics/siapp/add_to_ci
Browse files Browse the repository at this point in the history
[Core] Add SIApp to Linux CI
  • Loading branch information
sunethwarna authored Jan 20, 2025
2 parents c14fb45 + 5befa46 commit 769f199
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 40 deletions.
1 change: 1 addition & 0 deletions .github/workflows/configure_research_applications.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ void SensorView<TContainerType>::PrintData(std::ostream& rOStream) const
}

// template insantiations
template KRATOS_API(SYSTEM_IDENTIFICATION_APPLICATION) class SensorView<ModelPart::NodesContainerType>;
template KRATOS_API(SYSTEM_IDENTIFICATION_APPLICATION) class SensorView<ModelPart::ConditionsContainerType>;
template KRATOS_API(SYSTEM_IDENTIFICATION_APPLICATION) class SensorView<ModelPart::ElementsContainerType>;
template class SensorView<ModelPart::NodesContainerType>;
template class SensorView<ModelPart::ConditionsContainerType>;
template class SensorView<ModelPart::ElementsContainerType>;

} /* namespace Kratos.*/
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ ContainerExpression<TContainerType> SmoothClamper<TContainerType>::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();
Expand All @@ -98,7 +97,7 @@ ContainerExpression<TContainerType> SmoothClamper<TContainerType>::CalculateForw

auto p_result_exp = LiteralFlatExpression<double>::Create(number_of_entities, {});

IndexPartition<IndexType>(number_of_entities).for_each([&p_result_exp, &r_input_exp, min, delta](const auto Index) {
IndexPartition<IndexType>(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) {
Expand Down Expand Up @@ -156,8 +155,8 @@ ContainerExpression<TContainerType> SmoothClamper<TContainerType>::ProjectBackwa


// template instantiations
template KRATOS_API(SYSTEM_IDENTIFICATION_APPLICATION) class SmoothClamper<ModelPart::NodesContainerType>;
template KRATOS_API(SYSTEM_IDENTIFICATION_APPLICATION) class SmoothClamper<ModelPart::ConditionsContainerType>;
template KRATOS_API(SYSTEM_IDENTIFICATION_APPLICATION) class SmoothClamper<ModelPart::ElementsContainerType>;
template class SmoothClamper<ModelPart::NodesContainerType>;
template class SmoothClamper<ModelPart::ConditionsContainerType>;
template class SmoothClamper<ModelPart::ElementsContainerType>;

} /* namespace Kratos.*/
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand Down

0 comments on commit 769f199

Please sign in to comment.