Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
marchdf committed Sep 29, 2023
1 parent 4c31d54 commit cd2f96a
Show file tree
Hide file tree
Showing 16 changed files with 29 additions and 29 deletions.
6 changes: 3 additions & 3 deletions Docs/sphinx/Doc_COVO.tex
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ \subsection{Objectives and State-Of-the-Art}
\begin{itemize}
\item ODE equations solved (\textit{reactor type})
\item Default solver settings chosen (tolerances/order/...)
\item Linear solvers available, along with exemples of performance
\item Linear solvers available, along with examples of performance
\item Changes in PelePhysics run settings
\item Induced changes in the relying codes (such as PeleC)
\end{itemize}
Expand Down Expand Up @@ -112,7 +112,7 @@ \subsection{What's new chemistry-wise (in a nutshell)}
%=========================================
\section{Introduction to CVODE}
%=========================================
Cvode is part of a software family called sundials for SUite of Nonlinear and DIfferential/ALgebraic equation Solvers~\cite{hindmarsh2005sundials}. Currently, Cvode development version is v5.0.0, while the stable release version is v4.1.0. The version used with PelePhysics is v4.0.2. Cvode can be downladed off of \href{https://computation.llnl.gov/projects/sundials/sundials-software}{the internet}. In the following, details pertaining to the methods implemented in PelePhysics are provided. The interested user is referred to the very exhaustive Cvode User-guide~\cite{CVODE:2019} for more information.
Cvode is part of a software family called sundials for SUite of Nonlinear and DIfferential/ALgebraic equation Solvers~\cite{hindmarsh2005sundials}. Currently, Cvode development version is v5.0.0, while the stable release version is v4.1.0. The version used with PelePhysics is v4.0.2. Cvode can be downloaded off of \href{https://computation.llnl.gov/projects/sundials/sundials-software}{the internet}. In the following, details pertaining to the methods implemented in PelePhysics are provided. The interested user is referred to the very exhaustive Cvode User-guide~\cite{CVODE:2019} for more information.

\textit{Most of this section is adapted from the v4.1.0 Cvode Documentation.}

Expand Down Expand Up @@ -262,7 +262,7 @@ \subsubsection{Preliminary step: Cvode and SuiteSparse}
\textbf{The user is in charge of installing the proper Cvode version, as well as installing and properly linking the KLU library if sparsity features are needed.}

As previously said, the \textbf{Cvode version} employed to perform all tests presented in this document is \textbf{v4.0.2}. Cvode can be downloaded by following \href{https://computation.llnl.gov/projects/sundials/sundials-software}{this link}. \\
An "INSTALL_GUIDE.pdf" will be present in the source files, explaining how to properly install and build the needed librairies. If the KLU library is to be used, then the proper flags should be set. With the version sub-mentioned, those are "-DKLU_ENABLE" (should be set to "ON") "-DKLU_INCLUDE_DIR" (should point to the location where your "klu.h" file is) and "-DKLU_LIBRARY_DIR" (which should point to the location where your KLU library was generated).
An "INSTALL_GUIDE.pdf" will be present in the source files, explaining how to properly install and build the needed libraries. If the KLU library is to be used, then the proper flags should be set. With the version sub-mentioned, those are "-DKLU_ENABLE" (should be set to "ON") "-DKLU_INCLUDE_DIR" (should point to the location where your "klu.h" file is) and "-DKLU_LIBRARY_DIR" (which should point to the location where your KLU library was generated).

The \textbf{KLU library is part of the \textit{SuiteSparse} distribution}~\cite{SuiteSparse:2019} that can be downloaded~\href{http://faculty.cse.tamu.edu/davis/suitesparse.html}{following this link}. The SuiteSparse version used for all tests presented in this document is \textbf{v4.5.0}, and we do not guarantee that the linking will properly work with subsequent releases. A "README" file will explain how to generate the KLU library.

Expand Down
2 changes: 1 addition & 1 deletion Docs/sphinx/Introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The objective of this user-guide is to document the CVODE-based chemistry integr

- ODE equations (`reactor type`)
- Default settings (tolerances/order/...)
- Linear solvers available --along with exemples of performance
- Linear solvers available --along with examples of performance
- Setting-up a `PelePhysics` test case
- ...

Expand Down
2 changes: 1 addition & 1 deletion Docs/sphinx/QSS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ The formatting options are the following
* ``remove_pow`` **(boolean)** will convert expressions of the type ``pow(xxx,n)`` into multiplications or division. The conversion occurs for ``n<=3`` and ``n>=-3`` consistent with optimCuda_
* ``remove_pow10`` **(boolean)** will convert expressions of the type ``pow(10,xxx)`` into ``exp(ln(10)*xxx)``, consistent with optimCuda_
* ``min_op_count`` **(integer)** counts number operations used to construct each common subexpression and replace the common subexpression if the number of operations is less or equal to ``n``
* ``min_op_count_all`` **(integer)** is similar to ``min_op_count`` but also counts how many times that common subexpression is used later. The meaning of ``n`` is different than for ``min_op_count`` as it refers to how many more operations will be done if the common subexpression is eliminated. This option should be prefered to ``min_op_count`` as it tends to only marginally increase the file size (therefore compile time), while still being memory efficient.
* ``min_op_count_all`` **(integer)** is similar to ``min_op_count`` but also counts how many times that common subexpression is used later. The meaning of ``n`` is different than for ``min_op_count`` as it refers to how many more operations will be done if the common subexpression is eliminated. This option should be preferred to ``min_op_count`` as it tends to only marginally increase the file size (therefore compile time), while still being memory efficient.
* ``gradual_op_count`` **(boolean)** is useful if ``min_op_count`` or ``min_op_count_all`` are active. It loops from 1 to ``n`` and gradually eliminate the common subexpressions. This has the advantage of ensuring that the memory footprint is strictly monotonically decreasing as `n` is increased.
* ``store_in_jacobian`` **(boolean)** will use the Jacobian array as a temporary space to store intermediate variables. In particular, the last row of the Jacobian (dependence with respect to temperature) is done by finite difference which requires storing intermediate variables (production rate, forward and backward reactions). When the option is active, the ``productionRate`` function used to compute the finite difference is replaced with a ``productionRate_light`` functions where references to different parts of the Jacobian are used in place of allocating new arrays.
* ``round_decimals`` **(boolean)** will round floats printed by ``sympy`` when possible to minimize character count in the ``mechanism.H`` file.
Expand Down
4 changes: 2 additions & 2 deletions Docs/sphinx/Transport.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Transport
*********

PelePhysics supports computation of several transport coefficients: dyanmic viscosity (:math:`\mu`), bulk viscosity (:math:`\xi`), thermal conductivity (:math:`\lambda`), mixture-averaged species diffusion coefficients (:math:`D_i`), and Soret coefficients/thermal diffusion ratio (:math:`\chi_i`). There are three choices of model for computing these transport coefficients:
PelePhysics supports computation of several transport coefficients: dynamic viscosity (:math:`\mu`), bulk viscosity (:math:`\xi`), thermal conductivity (:math:`\lambda`), mixture-averaged species diffusion coefficients (:math:`D_i`), and Soret coefficients/thermal diffusion ratio (:math:`\chi_i`). There are three choices of model for computing these transport coefficients:

* ``Constant`` with user-specified values
* ``Sutherland``, adding a simple temperature dependence to user-specified values
Expand Down Expand Up @@ -44,7 +44,7 @@ This is another minimal model, based on the temperature dependence of viscosity
\mu = \mu_{ref} \left(\frac{T}{T_{ref}} \right)^{3/2} \frac{T_{ref} + S} {T + S},
where :math:`\mu_{ref}` is the dynamic viscosity at a reference temeprature :math:`T_{ref}` and :math:`S` is a constant. In the PelePhysics implementation, the thermal conductivity is then computed based on a user-specified Prandtl number, :math:`\lambda = \mu c_p / Pr`, where the heat capacity :math:`c_p` is evaluated using the EOS model. The user may specify constant values for the bulk viscosity and diffusvity (a single value for all species). Soret effects are not supported for this Transport model (:math:`\chi_i = 0`).
where :math:`\mu_{ref}` is the dynamic viscosity at a reference temperature :math:`T_{ref}` and :math:`S` is a constant. In the PelePhysics implementation, the thermal conductivity is then computed based on a user-specified Prandtl number, :math:`\lambda = \mu c_p / Pr`, where the heat capacity :math:`c_p` is evaluated using the EOS model. The user may specify constant values for the bulk viscosity and diffusvity (a single value for all species). Soret effects are not supported for this Transport model (:math:`\chi_i = 0`).

For Sutherland transport, there are several runtime parameters that may be specified in the input file: ::

Expand Down
2 changes: 1 addition & 1 deletion Docs/sphinx/Utility.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This section provides relevant notes on using these utilities across the Pele fa
Premixed Flame Initialization
=============================

Pre-computed profiles from 1D freely propogating premixed flames are used to initialize a wrinkled `flamesheet <https://amrex-combustion.github.io/PeleLMeX/manual/html/Tutorials_FlameSheet.html>`_ in PeleLMeX, among other problems. Right now, this capability is not used in PeleC, but similar code that accomplishes the same task using data files of the same format is applied in PeleC. The code has two parts, a data container defined in ``PMFData.{H,cpp}`` that loads and stores data from the pre-computed profile, and a function defined in ``PMF.H`` that, when provided this data structure and ther bounds of a cell of interest, returns temperature, velocity, and mole fractions from that location.
Pre-computed profiles from 1D freely propagating premixed flames are used to initialize a wrinkled `flamesheet <https://amrex-combustion.github.io/PeleLMeX/manual/html/Tutorials_FlameSheet.html>`_ in PeleLMeX, among other problems. Right now, this capability is not used in PeleC, but similar code that accomplishes the same task using data files of the same format is applied in PeleC. The code has two parts, a data container defined in ``PMFData.{H,cpp}`` that loads and stores data from the pre-computed profile, and a function defined in ``PMF.H`` that, when provided this data structure and the bounds of a cell of interest, returns temperature, velocity, and mole fractions from that location.

This code has two runtime parameters that may be set in the input file: ::

Expand Down
4 changes: 2 additions & 2 deletions Eos/SRK.H
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ struct SRK
Fomega[ii] * sqrtAsti[ii] * sqrtOneOverTc[ii]; // *-0.5*oneOverT*sqrtT
}

// intialize sums to 0
// initialize sums to 0
am = 0.0;
dAmdT = 0.0;
d2AmdT2 = 0.0;
Expand Down Expand Up @@ -527,7 +527,7 @@ struct SRK
CKMMWY(Y, wbar);
Rm = Constants::RU / wbar;

// Use ideal gas to get an inital guess
// Use ideal gas to get an initial guess
T = P * tau / Rm;
MixingRuleAmBm(T, Y, am, bm);

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# PelePhysics
*A respository of physics databases and implementation code for use with the `Pele` suite of of codes*
*A repository of physics databases and implementation code for use with the `Pele` suite of of codes*

## CEPTR

Expand Down
12 changes: 6 additions & 6 deletions Reactions/ReactorCvode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ ReactorCvode::initCvode(
int flag = CVodeSetUserData(a_cvode_mem, static_cast<void*>(a_udata));

// Call CVodeInit to initialize the integrator memory and specify the user's
// right hand side function, the inital time, and initial dependent variable
// right hand side function, the initial time, and initial dependent variable
// vector a_y.
flag = CVodeInit(a_cvode_mem, cF_RHS, a_time, a_y);
if (utils::check_flag(&flag, "CVodeInit", 1)) {
Expand Down Expand Up @@ -100,7 +100,7 @@ ReactorCvode::initCvode(
}
#else
amrex::Abort(
"Shoudn't be there. solve_type sparse_direct only available with CUDA");
"Shouldn't be there. solve_type sparse_direct only available with CUDA");
#endif
} else if (a_udata->solve_type == cvode::customDirect) {
#if defined(AMREX_USE_CUDA)
Expand All @@ -120,7 +120,7 @@ ReactorCvode::initCvode(
}
#else
amrex::Abort(
"Shoudn't be there. solve_type custom_direct only available with CUDA");
"Shouldn't be there. solve_type custom_direct only available with CUDA");
#endif
} else if (a_udata->solve_type == cvode::magmaDirect) {
#ifdef PELE_USE_MAGMA
Expand All @@ -136,7 +136,7 @@ ReactorCvode::initCvode(
}
#else
amrex::Abort(
"Shoudn't be there. solve_type magma_direct only available with "
"Shouldn't be there. solve_type magma_direct only available with "
"PELE_USE_MAGMA = TRUE");
#endif
} else if (a_udata->solve_type == cvode::GMRES) {
Expand Down Expand Up @@ -242,7 +242,7 @@ ReactorCvode::initCvode(
}

// Call CVodeInit to initialize the integrator memory and specify the user's
// right hand side function, the inital time, and initial dependent variable
// right hand side function, the initial time, and initial dependent variable
// vector a_y.
flag = CVodeInit(a_cvode_mem, cF_RHS, a_time, a_y);
if (utils::check_flag(&flag, "CVodeInit", 1) != 0) {
Expand Down Expand Up @@ -633,7 +633,7 @@ ReactorCvode::checkCvodeOptions(
#endif
}

// Print additionnal information
// Print additional information
if (a_precond_type == cvode::sparseSimpleAJac) {
int nJdata = 0;
const int HP =
Expand Down
2 changes: 1 addition & 1 deletion Reactions/ReactorCvodeUtils.H
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct CVODEUserData
amrex::Real* rhoesrc_ext = nullptr; // External energy forcing
amrex::Real* rYsrc_ext = nullptr; // External species forcing
int* mask =
nullptr; // Masking tagging cells where integration should not be perfomed
nullptr; // Masking tagging cells where integration should not be performed
int* FCunt = nullptr; // Number of RHS evaluations (not used on GPU)
amrex::Real gamma; // System Chem. jacobian coefficient
int nbBlocks; // GPU kernel launch parameter
Expand Down
2 changes: 1 addition & 1 deletion Support/Mechanism/Models/HP_DME/mechanism.H
Original file line number Diff line number Diff line change
Expand Up @@ -11952,7 +11952,7 @@ CKMMWC(amrex::Real* c, amrex::Real* wtm)
for (id = 0; id < 130; ++id) {
sumC += c[id];
}
/* CK provides no guard against divison by zero */
/* CK provides no guard against division by zero */
*wtm = W / sumC;

return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
H_W = 0.001
O_W = 0.016
N_W = 0.014
#Bilger coefs pour formule
#Bilger coefs pour formula
Bilger_coefs = np.zeros(4,'d')
Bilger_coefs[0] = 2.0 / C_W
Bilger_coefs[1] = 1.0 / ( 2.0 * H_W )
Expand Down
2 changes: 1 addition & 1 deletion Support/ceptr/ceptr/qssa.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def process_qss(fname, nqssa, visualize, method):
# Species
with open(nqssa) as f:
f_non_qssa_species = yaml.safe_load(f)
# Make sure the species are not interepreted as boolean
# Make sure the species are not interpreted as boolean
if (
False in f_non_qssa_species["species"]
or True in f_non_qssa_species["species"]
Expand Down
10 changes: 5 additions & 5 deletions Support/ceptr/ceptr/qssa_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,11 +463,11 @@ def get_qssa_groups(mechanism, species_info, reaction_info):
this includes two-way dependencies: (s1 needs s2) and (s2 needs s1) => group
and cyclical dependencies: (s1 needs s2) and (s2 needs s3) and (s3 needs s1) => group
This function along with find_closed_cycle is an implmentation of:
This function along with find_closed_cycle is an implementation of:
Tarjan's Strongly Connected Components Algorithm (1972)
where node "index" is stored implictly via the location of the
where node "index" is stored implicitly via the location of the
node in the lowest_link OrderedDict and boolean "onStack"
information is stored implicitly by checking for node existence in
potential_group
Expand Down Expand Up @@ -606,7 +606,7 @@ def find_closed_cycle(mechanism, species_info, species):
# Since the child has been discovered already during this
# search, that means it is in the group but still in the
# recursion process, Update the parent's lowest link value
# with this childs discovery order
# with this child's discovery order
species_info.qssa_info.lowest_link[parent] = min(
species_info.qssa_info.lowest_link[parent],
list(species_info.qssa_info.lowest_link.keys()).index(child),
Expand Down Expand Up @@ -733,7 +733,7 @@ def update_group_needs(mechanism, species_info, reaction_info):
not_in_group = True
# for the other groups
for other_group in other_groups:
# if the other group hasn't alredy been accounted
# if the other group hasn't already been accounted
# for and the species is in that group, then that
# other group depends on a species in the current
# group
Expand Down Expand Up @@ -793,7 +793,7 @@ def update_group_needs(mechanism, species_info, reaction_info):


def update_group_dependencies(mechanism, species_info, reaction_info):
"""Update solo species dependendent on group members with group names.
"""Update solo species dependent on group members with group names.
species needs member -> species needs group
species is needed by group member -> species is needed by group
Expand Down
2 changes: 1 addition & 1 deletion Support/ceptr/ceptr/qssa_reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def remove_quadratic_method_0(mechanism, qssa_species):
# Alphabetize, remove smallest set, break ties based on number of length of species name
[x.sort() for x in qssa_remove_proposal]
for x in qssa_remove_proposal:
print(f"Canditate QSSA species for removal: {x}")
print(f"Candidate QSSA species for removal: {x}")
ordered = sorted(
qssa_remove_proposal, key=lambda x: (len(x), sum([len(y) for y in x]))
)
Expand Down
2 changes: 1 addition & 1 deletion Support/ceptr/ceptr/symbolic_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ def recycle_cse_post(
if ind_cse:
# This is the symbol we would like to replace
target_replace = ind_cse[-1]
# Make sure that we havent replaced it already
# Make sure that we haven't replaced it already
while (
target_replace < n_cse
and common_expr_lhs[target_replace] in to_replace
Expand Down
2 changes: 1 addition & 1 deletion Utility/Diagnostics/DiagFramePlane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ DiagFramePlane::init(const std::string& a_prefix, std::string_view a_diagName)

amrex::ParmParse pp(a_prefix);

// Outputed variables
// Outputted variables
int nOutFields = pp.countval("field_names");
AMREX_ASSERT(nOutFields > 0);
m_fieldNames.resize(nOutFields);
Expand Down

0 comments on commit cd2f96a

Please sign in to comment.