Skip to content

Commit

Permalink
Adding RomApplication to CI (#8583)
Browse files Browse the repository at this point in the history
* Adding RomApplication to configure files

* swapping declaration order to avoid WARNING

* using int and static_cast in for loops for Windows compile

Co-authored-by: Rubén Zorrilla <[email protected]>
  • Loading branch information
Rbravo555 and rubenzorrilla authored Apr 14, 2021
1 parent 0f7d878 commit 6c31497
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/configure.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\ShapeOptimizationA
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\ConstitutiveLawsApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\RANSApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\CompressiblePotentialFlowApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\RomApplication;

del /F /Q "%KRATOS_BUILD%\%KRATOS_BUILD_TYPE%\cmake_install.cmake"
del /F /Q "%KRATOS_BUILD%\%KRATOS_BUILD_TYPE%\CMakeCache.txt"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ add_app ${KRATOS_APP_DIR}/MultilevelMonteCarloApplication;
add_app ${KRATOS_APP_DIR}/StatisticsApplication;
add_app ${KRATOS_APP_DIR}/SwimmingDEMApplication;
add_app ${KRATOS_APP_DIR}/ConstitutiveLawsApplication;
add_app ${KRATOS_APP_DIR}/RomApplication;

# Clean
clear
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ class ROMBuilderAndSolver : public BuilderAndSolver<TSparseSpace, TDenseSpace, T
const Matrix *pcurrent_rom_nodal_basis = nullptr;
unsigned int old_dof_id;
#pragma omp for nowait
for (unsigned int k = 0; k<dofs_number; k++){
for (int k = 0; k < static_cast<int>(dofs_number); k++){
auto dof = dofs_begin + k;
if(pcurrent_rom_nodal_basis == nullptr){
pcurrent_rom_nodal_basis = &(rModelPart.pGetNode(dof->Id())->GetValue(ROM_BASIS));
Expand All @@ -343,7 +343,7 @@ class ROMBuilderAndSolver : public BuilderAndSolver<TSparseSpace, TDenseSpace, T
{
const Matrix *pcurrent_rom_nodal_basis = nullptr;
int counter = 0;
for(unsigned int k = 0; k < dofs.size(); ++k){
for(int k = 0; k < static_cast<int>(dofs.size()); ++k){
auto variable_key = dofs[k]->GetVariable().Key();
if(k==0)
pcurrent_rom_nodal_basis = &(geom[counter].GetValue(ROM_BASIS));
Expand Down Expand Up @@ -427,7 +427,7 @@ class ROMBuilderAndSolver : public BuilderAndSolver<TSparseSpace, TDenseSpace, T
Matrix aux;

#pragma omp for nowait
for (int k = 0; k < nelements; k++)
for (int k = 0; k < static_cast<int>(nelements); k++)
{
auto it_el = el_begin + k;
//detect if the element is active or not. If the user did not make any choice the element
Expand Down Expand Up @@ -455,7 +455,7 @@ class ROMBuilderAndSolver : public BuilderAndSolver<TSparseSpace, TDenseSpace, T
}

#pragma omp for nowait
for (int k = 0; k < nconditions; k++){
for (int k = 0; k < static_cast<int>(nconditions); k++){
auto it = cond_begin + k;

//detect if the element is active or not. If the user did not make any choice the condition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ namespace Kratos
std::vector< std::string > mNodalVariablesNames;
int mNodalDofs;
unsigned int mRomDofs;
BaseSchemeType::Pointer mpScheme;
ModelPart& mpModelPart;
BaseSchemeType::Pointer mpScheme;
std::unordered_map<Kratos::VariableData::KeyType,int> MapPhi;
};

Expand Down

0 comments on commit 6c31497

Please sign in to comment.