HELLO,I am a rookie CFD coder ,I want to Parallelize my code with OpenMP. I am using structured grid.
For two-dimensional calculations,there are two for loop. In each mesh point,I need to use mutation++ to calculate
mixture properties,T 、P...
My serial code works well,I can pass mixture using C + + Reference.
//---------------------------------------------------------C++ code----------------------
void Icondition(variable Q, conser TS, Mutation::Mixture &gas){...}
//---------------------------------------------------------C++ code----------------------
If I creat a new mixture class in each mesh point ,it is very slow,because it need read text file form
Local memory.How shou I use mutation++ with OpenMP Correctly and Efficiently?
My OS Version:20.04
HELLO,I am a rookie CFD coder ,I want to Parallelize my code with OpenMP. I am using structured grid. For two-dimensional calculations,there are two for loop. In each mesh point,I need to use mutation++ to calculate mixture properties,T 、P...
My serial code works well,I can pass mixture using C + + Reference. //---------------------------------------------------------C++ code---------------------- void Icondition(variable Q, conser TS, Mutation::Mixture &gas){...} //---------------------------------------------------------C++ code----------------------
If I creat a new mixture class in each mesh point ,it is very slow,because it need read text file form Local memory.How shou I use mutation++ with OpenMP Correctly and Efficiently?
//---------------------------------------------------------C++ code---------------------- void Redi(variable *Q, Mutation::MixtureOptions &gas) { Mutation::MixtureOptions opt(gas);
pragma omp parallel for default(shared) private(opt) num_threads(NCORES)
} //---------------------------------------------------------C++ code----------------------