Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove tc thread private array #435

Merged
merged 9 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30,946 changes: 14,651 additions & 16,295 deletions Support/Mechanism/Models/Aromatic_KrNara/mechanism.H

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions Support/Mechanism/Models/Aromatic_KrNara/mechanism.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -912,15 +912,14 @@ void
progressRateFR(
amrex::Real* q_f, amrex::Real* q_r, amrex::Real* sc, amrex::Real T)
{
const amrex::Real tc[5] = {
log(T), T, T * T, T * T * T, T * T * T * T}; // temperature cache
amrex::Real invT = 1.0 / tc[1];
const amrex::Real invT = 1.0 / T;
const amrex::Real logT = log(T);
// compute the Gibbs free energy
amrex::Real g_RT[158];
gibbs(g_RT, tc);
gibbs(g_RT, T);

amrex::Real sc_qss[1];
comp_qfqr(q_f, q_r, sc, sc_qss, tc, invT);
comp_qfqr(q_f, q_r, sc, sc_qss, T, invT, logT);
}

// save atomic weights into array
Expand Down
2,333 changes: 1,087 additions & 1,246 deletions Support/Mechanism/Models/BurkeDryer/mechanism.H

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions Support/Mechanism/Models/BurkeDryer/mechanism.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,14 @@ void
progressRateFR(
amrex::Real* q_f, amrex::Real* q_r, amrex::Real* sc, amrex::Real T)
{
const amrex::Real tc[5] = {
log(T), T, T * T, T * T * T, T * T * T * T}; // temperature cache
amrex::Real invT = 1.0 / tc[1];
const amrex::Real invT = 1.0 / T;
const amrex::Real logT = log(T);
// compute the Gibbs free energy
amrex::Real g_RT[13];
gibbs(g_RT, tc);
gibbs(g_RT, T);

amrex::Real sc_qss[1];
comp_qfqr(q_f, q_r, sc, sc_qss, tc, invT);
comp_qfqr(q_f, q_r, sc, sc_qss, T, invT, logT);
}

// save atomic weights into array
Expand Down
8,562 changes: 4,040 additions & 4,522 deletions Support/Mechanism/Models/C1-C2-NO/mechanism.H

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions Support/Mechanism/Models/C1-C2-NO/mechanism.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,14 @@ void
progressRateFR(
amrex::Real* q_f, amrex::Real* q_r, amrex::Real* sc, amrex::Real T)
{
const amrex::Real tc[5] = {
log(T), T, T * T, T * T * T, T * T * T * T}; // temperature cache
amrex::Real invT = 1.0 / tc[1];
const amrex::Real invT = 1.0 / T;
const amrex::Real logT = log(T);
// compute the Gibbs free energy
amrex::Real g_RT[44];
gibbs(g_RT, tc);
gibbs(g_RT, T);

amrex::Real sc_qss[1];
comp_qfqr(q_f, q_r, sc, sc_qss, tc, invT);
comp_qfqr(q_f, q_r, sc, sc_qss, T, invT, logT);
}

// save atomic weights into array
Expand Down
38,249 changes: 18,828 additions & 19,421 deletions Support/Mechanism/Models/C1-C2-NO_qss/mechanism.H

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions Support/Mechanism/Models/C1-C2-NO_qss/mechanism.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,22 +234,21 @@ void
progressRateFR(
amrex::Real* q_f, amrex::Real* q_r, amrex::Real* sc, amrex::Real T)
{
const amrex::Real tc[5] = {
log(T), T, T * T, T * T * T, T * T * T * T}; // temperature cache
amrex::Real invT = 1.0 / tc[1];
const amrex::Real invT = 1.0 / T;
const amrex::Real logT = log(T);
// compute the Gibbs free energy
amrex::Real g_RT[39];
gibbs(g_RT, tc);
gibbs(g_RT, T);
amrex::Real g_RT_qss[5];
gibbs_qss(g_RT_qss, tc);
gibbs_qss(g_RT_qss, T);

amrex::Real sc_qss[5];
// Fill sc_qss here
amrex::Real kf_qss[70], qf_qss[70], qr_qss[70];
comp_k_f_qss(tc, invT, kf_qss);
comp_qss_coeff(kf_qss, qf_qss, qr_qss, sc, tc, g_RT, g_RT_qss);
comp_k_f_qss(T, invT, logT, kf_qss);
comp_qss_coeff(kf_qss, qf_qss, qr_qss, sc, T, g_RT, g_RT_qss);
comp_sc_qss(sc_qss, qf_qss, qr_qss);
comp_qfqr(q_f, q_r, sc, sc_qss, tc, invT);
comp_qfqr(q_f, q_r, sc, sc_qss, T, invT, logT);
}

// save atomic weights into array
Expand Down
3,392 changes: 1,592 additions & 1,800 deletions Support/Mechanism/Models/CH4_lean/mechanism.H

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions Support/Mechanism/Models/CH4_lean/mechanism.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,14 @@ void
progressRateFR(
amrex::Real* q_f, amrex::Real* q_r, amrex::Real* sc, amrex::Real T)
{
const amrex::Real tc[5] = {
log(T), T, T * T, T * T * T, T * T * T * T}; // temperature cache
amrex::Real invT = 1.0 / tc[1];
const amrex::Real invT = 1.0 / T;
const amrex::Real logT = log(T);
// compute the Gibbs free energy
amrex::Real g_RT[17];
gibbs(g_RT, tc);
gibbs(g_RT, T);

amrex::Real sc_qss[1];
comp_qfqr(q_f, q_r, sc, sc_qss, tc, invT);
comp_qfqr(q_f, q_r, sc, sc_qss, T, invT, logT);
}

// save atomic weights into array
Expand Down
Loading