Commit 084f91e0 authored by Lluis Jofre Cruanyes's avatar Lluis Jofre Cruanyes
Browse files

RHEA cleaned

parent 3441a93b
Loading
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -3419,7 +3419,8 @@ double FlowSolverRHEA::updateTimeRmsfQuantity(const double &quantity, const doub

double FlowSolverRHEA::updateTimeFavreAveragedQuantity(const double &quantity_1, const double &mean_rho_quantity_1, const double &quantity_2, const double &mean_rho_quantity_2, const double &rho, const double &mean_rho, const double &favre_averaged_quantity, const double &delta_t, const double &averaging_time) {

    double old_mean_rho = ( ( averaging_time + delta_t )*mean_rho - rho*delta_t )/max( averaging_time, epsilon );
    //double old_mean_rho = ( ( averaging_time + delta_t )*mean_rho - rho*delta_t )/max( averaging_time, epsilon );
    double old_mean_rho = ( ( averaging_time + delta_t )*mean_rho - rho*delta_t )/max( averaging_time, 1.0e-10 );	// ... modified for OpenACC

    double favre_mean_quantity_1              = mean_rho_quantity_1/mean_rho;
    double favre_mean_quantity_2              = mean_rho_quantity_2/mean_rho;
@@ -4094,7 +4095,8 @@ double MurmanRoeFluxApproximateRiemannSolver::calculateIntercellFlux(const doubl
    }

    /// Wave speed
    double S = abs( ( F_L - F_R )/max( U_L - U_R, epsilon ) );
    //double S = abs( ( F_L - F_R )/( U_L - U_R + epsilon ) );
    double S = abs( ( F_L - F_R )/( U_L - U_R + 1.0e-10 ) );	// ... modified for OpenACC

    /// Conservative + dissipative flux form
    double F = 0.5*( F_L + F_R ) - 0.5*S*( U_R - U_L );
@@ -4463,7 +4465,8 @@ double EckepFluxApproximateRiemannSolver::calculateIntercellFlux(const double &r
        double psi_L = u_L*P_L/T_L;
        double psi_R = u_R*P_R/T_R;
        double deltaPsi = psi_R - psi_L;
        double alpha_3  = ( bar_F_1*deltaV_1 + bar_F_2*deltaV_2 + bar_F_3*deltaV_3 - deltaPsi )/max( deltaV_3*deltaV_3, epsilon );
        //double alpha_3  = ( bar_F_1*deltaV_1 + bar_F_2*deltaV_2 + bar_F_3*deltaV_3 - deltaPsi )/( deltaV_3*deltaV_3 + epsilon );
        double alpha_3  = ( bar_F_1*deltaV_1 + bar_F_2*deltaV_2 + bar_F_3*deltaV_3 - deltaPsi )/( deltaV_3*deltaV_3 + 1.0e-10 );	// ... modified for OpenACC
        F = bar_F_3 - ( 1.0/2.0 )*alpha_3*deltaV_3;
    }

+9 −7
Original line number Diff line number Diff line
RHEA DEVELOPMENT AGENDA:

- Solve run problem bug (it may be connected to having only one cell in a direction)
- Improve partition to allow non-divisible configurations
- Implement OpenACC acceleration
- Add thermodynamic and transport coefficients models using CoolProp
- Improve OpenACC acceleration:
	- Split 3D loops into one per direction
	- Find alternative to calling I1D every time
	- Substitute "privates" for routines
	- Implement "pragma acc cache"
	- GPU-aware MPI communicate_particles
- Implement OpenMP acceleration
- ...

- Change divisions by inverse multiplications
- Incorporate message that HDF5 labels cannot include special characters
- Create/check destructors of Willy's classes
- Create/check destructors for all classes
- Implement regression tests using gitlab machinery
- Improve code implementation/notation/aesthetics in all files
- Check that it compiles and runs with different compilers (gcc, clang, intel, etc)
- Verify numerics and parallelization with different number of processes (including 1)
- ...

stuff/backup_Makefile

deleted100644 → 0
+0 −17
Original line number Diff line number Diff line
CC=mpic++
#CFLAGS=-O3 -L/usr/local/Cellar/hdf5/1.12.0_1/lib/ -lhdf5_cpp -I/usr/local/Cellar/hdf5/1.12.0_1/include 
CFLAGS=-O3 -lhdf5  
OBJ=src/*.cpp
OUT=RHEA.exe
GUIFLAGS=-Wall -I/Users/goyarzun/DEV/apps/yaml-cpp/include -L/Users/goyarzun/DEV/apps/yaml-cpp/build5/ -lyaml-cpp


all:
#	$(CC) heat_h5_hyper.cpp $(OBJ) -o $(OUT) $(CFLAGS)
	$(CC) myRHEA.cpp -L/usr/local/lib -I/usr/local/include -std=c++0x $(OBJ) -o $(OUT) $(CFLAGS) -lyaml-cpp
#	$(CC) myRHEA.cpp $(GUIFLAGS) -std=c++11 $(OBJ) -o $(OUT) $(CFLAGS)
#	$(CC) myRHEA.cpp $(OBJ) -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi -I/usr/include/hdf5/openmpi -o $(OUT) $(CFLAGS) -lyaml-cpp

clean:
	rm $(OUT)