Skip to content

Commit

Permalink
santiy checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Steffen Schotthöfer committed Sep 13, 2024
1 parent 3fcc2ea commit 3156758
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -582,10 +582,10 @@ unsigned Mesh::GetCellOfKoordinate( const double x, const double y ) const {
unsigned koordinate_cell_id = std::numeric_limits<unsigned>::max();
bool found = false;

// #pragma omp parallel for shared( found )
#pragma omp parallel for shared( found )
for( unsigned idx_cell = 0; idx_cell < _numCells; idx_cell++ ) {
if( IsPointInsideCell( idx_cell, x, y ) ) {
// #pragma omp critical
#pragma omp critical
{
if( !found ) {
koordinate_cell_id = idx_cell;
Expand Down
5 changes: 5 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ int main( int argc, char** argv ) {
// Py_SetProgramName( program );
#ifdef BUILD_MPI
MPI_Init( &argc, &argv );
printf( "MPI initialized\n" );
#endif
#ifndef BUILD_MPI
printf( "MPI not initialized\n" );
#endif

std::string filename = ParseArguments( argc, argv );

// CD Load Settings from File
Expand Down
1 change: 1 addition & 0 deletions src/solvers/snsolver_hpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ SNSolverHPC::SNSolverHPC( Config* settings ) {
auto nodes = _mesh->GetNodes();
auto cells = _mesh->GetCells();

#pragma omp parallel for
for( unsigned idx_cell = 0; idx_cell < _nCells; idx_cell++ ) {
_areas[idx_cell] = areas[idx_cell];
}
Expand Down

0 comments on commit 3156758

Please sign in to comment.