Commit aa65a4e9 authored by Morales Hernandez, Mario's avatar Morales Hernandez, Mario
Browse files

change in boundary conditions and update c++ lib

Boundary cells are now included in the update for the boundary
conditions (not only the ghost cells) since the algorithm is more
stable. Additionally, the makefile.hpoc has been updated with the last
version of C++ libraries. With these libraries, the was an error with
the function itoa. It has been redefined in string_utils.h
parent 24e77544
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
ifdef ACTIVE_GPU
	CC := nvcc
	INC_DIRS := 
	FLAGS := --compiler-bindir `which mpic++` -arch=sm_35 -x cu
	FLAGS := --compiler-bindir `which mpic++` -arch=sm_70 -x cu
	LIBRARIES := 
	DFLAGS := -DACTIVE_GPU=1
else
@@ -15,5 +15,5 @@ endif
triton: src/main.cpp
	if [ ! -d "build" ]; then mkdir build; fi
	@echo 'Compiling file: $<'
	$(CC) $(INC_DIRS:%=-I%) $(FLAGS) $(DFLAGS) -O3 $(LIBRARIES) -o "build/$@" "$<" --std=c++11
	$(CC) $(INC_DIRS:%=-I%) $(FLAGS) $(DFLAGS) -O3 $(LIBRARIES) -o "build/$@" "$<" --std=c++20
	@echo 'Building finished: $@'
+12 −1
Original line number Diff line number Diff line
@@ -1322,23 +1322,34 @@ namespace Kernels
				h_arr[ii-1] = hij;
				qx_arr[ii-1] = -qxij;
				qy_arr[ii-1] = 0.0;
				h_arr[ii] = hij;
				qx_arr[ii] = -qxij;
				qy_arr[ii] = 0.0;
			}
			if(is_rt){ //east
				h_arr[ii+1] = hij;
				qx_arr[ii+1] = qxij;
				qy_arr[ii+1] = 0.0;
				h_arr[ii] = hij;
				qx_arr[ii] = qxij;
				qy_arr[ii] = 0.0;
			}
			if (rank == 0 && is_top){ //north
				h_arr[ii-ncols] = hij;
				qx_arr[ii-ncols] = 0.0;
				qy_arr[ii-ncols] = qyij;
				h_arr[ii] = hij;
				qx_arr[ii] = 0.0;
				qy_arr[ii] = qyij;
			}

			if (rank == total_process - 1 && is_btm) //south
			{
				h_arr[ii+ncols] = hij;
				qx_arr[ii+ncols] = 0.0;
				qy_arr[ii+ncols] = -qyij;
				h_arr[ii] = hij;
				qx_arr[ii] = 0.0;
				qy_arr[ii] = -qyij;
			}

#ifdef ACTIVE_OMP
+1 −1
Original line number Diff line number Diff line
@@ -243,7 +243,7 @@ namespace StringUtils

	std::string itoa(int i)
	{
		return (static_cast<std::ostringstream*> (&(std::ostringstream() << i))->str());
		return std::to_string(i);
	}