Skip to content
Open
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
4 changes: 2 additions & 2 deletions benchmarks/advection_reaction_3D/kokkos/ParallelGrid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
* freedom, and that uses Kokkos views to store communication buffer data.
* ----------------------------------------------------------------------------*/

#ifndef _KOKKOSPARGRID_H
#define _KOKKOSPARGRID_H
#ifndef SUNDIALS_PARALLELGRID_HPP
#define SUNDIALS_PARALLELGRID_HPP

#include <Kokkos_Core.hpp>
#include <fstream>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* SUNDIALS Copyright End
* ---------------------------------------------------------------------------*/

#ifndef ADVECTION_REACTION_3D_HPP
#define ADVECTION_REACTION_3D_HPP
#ifndef SUNDIALS_ADVECTION_REACTION_3D_HPP
#define SUNDIALS_ADVECTION_REACTION_3D_HPP

#include <cmath>
#include <cstdio>
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/advection_reaction_3D/kokkos/check_retval.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* SUNDIALS Copyright End
* ---------------------------------------------------------------------------*/

#ifndef _SUNDIALS_CHECK_RETVAL_H_
#define _SUNDIALS_CHECK_RETVAL_H_
#ifndef SUNDIALS_CHECK_RETVAL_H
#define SUNDIALS_CHECK_RETVAL_H

#include <stdio.h>

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/advection_reaction_3D/kokkos/rhs3D.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* SUNDIALS Copyright End
* -----------------------------------------------------------------------------*/

#ifndef ADVECTION_REACTION_3D_RHS_HPP
#define ADVECTION_REACTION_3D_RHS_HPP
#ifndef SUNDIALS_RHS3D_HPP
#define SUNDIALS_RHS3D_HPP

#include "advection_reaction_3D.hpp"

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/advection_reaction_3D/raja/ParallelGrid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
* supports up to 3 dimensions and an arbitrary number of degrees of freedom.
* ----------------------------------------------------------------------------*/

#ifndef _SIMPLEPARGRID_H
#define _SIMPLEPARGRID_H
#ifndef SUNDIALS_PARALLELGRID_HPP
#define SUNDIALS_PARALLELGRID_HPP

#include <fstream>
#include <iomanip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* SUNDIALS Copyright End
* ---------------------------------------------------------------------------*/

#ifndef ADVECTION_REACTION_3D_HPP
#define ADVECTION_REACTION_3D_HPP
#ifndef SUNDIALS_ADVECTION_REACTION_3D_HPP
#define SUNDIALS_ADVECTION_REACTION_3D_HPP

#include <RAJA/RAJA.hpp>
#include <cmath>
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/advection_reaction_3D/raja/backends.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* SUNDIALS Copyright End
* ---------------------------------------------------------------------------*/

#ifndef ADVECTION_REACTION_3D_BACKENDS_HPP
#define ADVECTION_REACTION_3D_BACKENDS_HPP
#ifndef SUNDIALS_BACKENDS_HPP
#define SUNDIALS_BACKENDS_HPP

#include <RAJA/RAJA.hpp>

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/advection_reaction_3D/raja/check_retval.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* SUNDIALS Copyright End
* ---------------------------------------------------------------------------*/

#ifndef _SUNDIALS_CHECK_RETVAL_H_
#define _SUNDIALS_CHECK_RETVAL_H_
#ifndef SUNDIALS_CHECK_RETVAL_H
#define SUNDIALS_CHECK_RETVAL_H

#include <stdio.h>

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/advection_reaction_3D/raja/rhs3D.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* SUNDIALS Copyright End
* -----------------------------------------------------------------------------*/

#ifndef ADVECTION_REACTION_3D_RHS_HPP
#define ADVECTION_REACTION_3D_RHS_HPP
#ifndef SUNDIALS_RHS3D_HPP
#define SUNDIALS_RHS3D_HPP

#include "advection_reaction_3D.hpp"

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/diffusion_2D/diffusion_2D.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* Shared header file for 2D diffusion benchmark problem
* ---------------------------------------------------------------------------*/

#ifndef DIFFUSION_2D_HPP
#define DIFFUSION_2D_HPP
#ifndef SUNDIALS_DIFFUSION_2D_HPP
#define SUNDIALS_DIFFUSION_2D_HPP

#include <algorithm>
#include <cmath>
Expand Down
4 changes: 2 additions & 2 deletions bindings/sundials4py/arkode/arkode_usersupplied.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* SUNDIALS Copyright End
*----------------------------------------------------------------------------*/

#ifndef _SUNDIALS4PY_ARKODE_USERSUPPLIED_HPP
#define _SUNDIALS4PY_ARKODE_USERSUPPLIED_HPP
#ifndef SUNDIALS_ARKODE_USERSUPPLIED_HPP
#define SUNDIALS_ARKODE_USERSUPPLIED_HPP

#include <arkode/arkode.h>
#include <arkode/arkode_arkstep.h>
Expand Down
4 changes: 2 additions & 2 deletions bindings/sundials4py/cvodes/cvodes_usersupplied.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* SUNDIALS Copyright End
*----------------------------------------------------------------------------*/

#ifndef _SUNDIALS4PY_CVODE_USERSUPPLIED_HPP
#define _SUNDIALS4PY_CVODE_USERSUPPLIED_HPP
#ifndef SUNDIALS_CVODES_USERSUPPLIED_HPP
#define SUNDIALS_CVODES_USERSUPPLIED_HPP

#include <cvodes/cvodes.h>
#include <cvodes/cvodes_ls.h>
Expand Down
4 changes: 2 additions & 2 deletions bindings/sundials4py/idas/idas_usersupplied.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* SUNDIALS Copyright End
*----------------------------------------------------------------------------*/

#ifndef _SUNDIALS4PY_IDAS_USERSUPPLIED_HPP
#define _SUNDIALS4PY_IDAS_USERSUPPLIED_HPP
#ifndef SUNDIALS_IDAS_USERSUPPLIED_HPP
#define SUNDIALS_IDAS_USERSUPPLIED_HPP

#include <idas/idas.h>
#include <idas/idas_ls.h>
Expand Down
4 changes: 2 additions & 2 deletions bindings/sundials4py/include/sundials4py_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* SUNDIALS Copyright End
*----------------------------------------------------------------------------*/

#ifndef _SUNDIALS4PY_HELPERS_HPP
#define _SUNDIALS4PY_HELPERS_HPP
#ifndef SUNDIALS_SUNDIALS4PY_HELPERS_HPP
#define SUNDIALS_SUNDIALS4PY_HELPERS_HPP

#include "sundials4py.hpp"

Expand Down
4 changes: 2 additions & 2 deletions bindings/sundials4py/include/sundials4py_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* SUNDIALS Copyright End
*----------------------------------------------------------------------------*/

#ifndef _SUNDIALS4PY_TYPES_HPP
#define _SUNDIALS4PY_TYPES_HPP
#ifndef SUNDIALS_SUNDIALS4PY_TYPES_HPP
#define SUNDIALS_SUNDIALS4PY_TYPES_HPP

#include <stdexcept>

Expand Down
6 changes: 3 additions & 3 deletions bindings/sundials4py/kinsol/kinsol_usersupplied.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* SUNDIALS Copyright End
*----------------------------------------------------------------------------*/

#ifndef _SUNDIALS4PY_KINSOL_USERSUPPLIED_HPP
#define _SUNDIALS4PY_KINSOL_USERSUPPLIED_HPP
#ifndef SUNDIALS_KINSOL_USERSUPPLIED_HPP
#define SUNDIALS_KINSOL_USERSUPPLIED_HPP

#include <cstdlib>
#include <cstring>
Expand Down Expand Up @@ -185,4 +185,4 @@ inline int kinsol_lsjtvsysfn_wrapper(Args... args)
1>(&kinsol_user_supplied_fn_table::lsjtvsysfn, std::forward<Args>(args)...);
}

#endif // _SUNDIALS4PY_KINSOL_USERSUPPLIED_HPP
#endif // SUNDIALS_KINSOL_USERSUPPLIED_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* SUNDIALS Copyright End
*----------------------------------------------------------------------------*/

#ifndef _SUNDIALS4PY_SUNCONTEXT_USERSUPPLIED_HPP
#define _SUNDIALS4PY_SUNCONTEXT_USERSUPPLIED_HPP
#ifndef SUNDIALS_SUNDIALS_CONTEXT_USERSUPPLIED_HPP
#define SUNDIALS_SUNDIALS_CONTEXT_USERSUPPLIED_HPP

#include <cstdlib>
#include <cstring>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* SUNDIALS Copyright End
*----------------------------------------------------------------------------*/

#ifndef _SUNDIALS4PY_SUNDOMEIGESTIMATOR_USERSUPPLIED_HPP
#define _SUNDIALS4PY_SUNDOMEIGESTIMATOR_USERSUPPLIED_HPP
#ifndef SUNDIALS_SUNDIALS_DOMEIGESTIMATOR_USERSUPPLIED_HPP
#define SUNDIALS_SUNDIALS_DOMEIGESTIMATOR_USERSUPPLIED_HPP

#include <cstdlib>
#include <cstring>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* SUNDIALS Copyright End
* -----------------------------------------------------------------*/

#ifndef _SUNDIALS4PY_LINEARSOLVER_USERSUPPLIED_HPP
#define _SUNDIALS4PY_LINEARSOLVER_USERSUPPLIED_HPP
#ifndef SUNDIALS_SUNDIALS_LINEARSOLVER_USERSUPPLIED_HPP
#define SUNDIALS_SUNDIALS_LINEARSOLVER_USERSUPPLIED_HPP

#include <cstdlib>
#include <cstring>
Expand Down Expand Up @@ -61,4 +61,4 @@ inline int sunlinearsolver_psolvefn_wrapper(Args... args)
5>(&SUNLinearSolverFunctionTable::PSolveFn, std::forward<Args>(args)...);
}

#endif // _SUNDIALS4PY_LINEARSOLVER_USERSUPPLIED_HPP
#endif // SUNDIALS_SUNDIALS_LINEARSOLVER_USERSUPPLIED_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* SUNDIALS Copyright End
* -----------------------------------------------------------------*/

#ifndef _SUNDIALS4PY_NONLINEARSOLVER_USERSUPPLIED_HPP
#define _SUNDIALS4PY_NONLINEARSOLVER_USERSUPPLIED_HPP
#ifndef SUNDIALS_SUNDIALS_NONLINEARSOLVER_USERSUPPLIED_HPP
#define SUNDIALS_SUNDIALS_NONLINEARSOLVER_USERSUPPLIED_HPP

#include <cstdlib>
#include <cstring>
Expand Down Expand Up @@ -77,4 +77,4 @@ inline int sunnonlinearsolver_convtestfn_wrapper(Args... args)
1>(&SUNNonlinearSolverFunctionTable::convtestfn, std::forward<Args>(args)...);
}

#endif // _SUNDIALS4PY_NONLINEARSOLVER_USERSUPPLIED_HPP
#endif // SUNDIALS_SUNDIALS_NONLINEARSOLVER_USERSUPPLIED_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
* SUNDIALS Copyright End
* -----------------------------------------------------------------*/

#ifndef _SUNDIALS4PY_STEPPER_USERSUPPLIED_HPP
#define _SUNDIALS4PY_STEPPER_USERSUPPLIED_HPP
#ifndef SUNDIALS_SUNDIALS_STEPPER_USERSUPPLIED_HPP
#define SUNDIALS_SUNDIALS_STEPPER_USERSUPPLIED_HPP

#include <cstdlib>
#include <cstring>
Expand Down Expand Up @@ -147,4 +147,4 @@ inline SUNErrCode sunstepper_get_num_steps_wrapper(SUNStepper stepper,
return std::get<0>(result);
}

#endif // _SUNDIALS4PY_STEPPER_USERSUPPLIED_HPP
#endif // SUNDIALS_SUNDIALS_STEPPER_USERSUPPLIED_HPP
11 changes: 10 additions & 1 deletion doc/superbuild/source/developers/source_code/Naming.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,16 @@ camelcase for private names (e.g. ``doSomething``).
Macros/Constants
----------------

Upper case should be used for macros and constants.
Upper case should be used for macros and constants. All header files should
contain an include guard defining a macro starting with ``SUNDIALS_`` followed
by the file name in upper case. For example, ``my_header.h`` should contain

.. code-block:: c

#ifndef SUNDIALS_MY_HEADER_H
#define SUNDIALS_MY_HEADER_H
// ...
#endif

Variable names
--------------
Expand Down
4 changes: 2 additions & 2 deletions examples/arkode/CXX_parallel/ark_brusselator1D.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* SUNDIALS Copyright End
* ---------------------------------------------------------------------------*/

#ifndef _ARK_BRUSSELATOR1D_H
#define _ARK_BRUSSELATOR1D_H
#ifndef SUNDIALS_ARK_BRUSSELATOR1D_H
#define SUNDIALS_ARK_BRUSSELATOR1D_H

#include <cmath>
#include <cstdio>
Expand Down
6 changes: 3 additions & 3 deletions examples/arkode/C_serial/ark_damped_harmonic_symplectic.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* Utilities for the arkode_damped_harmonic_symplectic example.
* ---------------------------------------------------------------------------*/

#ifndef ARK_DAMPED_HARMONIC_SYMPLECTIC_H
#define ARK_DAMPED_HARMONIC_SYMPLECTIC_H
#ifndef SUNDIALS_ARK_DAMPED_HARMONIC_SYMPLECTIC_H
#define SUNDIALS_ARK_DAMPED_HARMONIC_SYMPLECTIC_H

#include <stdio.h>
#include <stdlib.h>
Expand Down Expand Up @@ -148,4 +148,4 @@ static int check_retval(void* returnvalue, const char* funcname, int opt)
return 0;
}

#endif /* ARK_DAMPED_HARMONIC_SYMPLECTIC_H */
#endif /* SUNDIALS_ARK_DAMPED_HARMONIC_SYMPLECTIC_H */
6 changes: 3 additions & 3 deletions examples/arkode/C_serial/ark_harmonic_symplectic.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* Utilities for the arkode_harmonic_symplectic example.
* ---------------------------------------------------------------------------*/

#ifndef ARK_HARMONIC_SYMPLECTIC_H
#define ARK_HARMONIC_SYMPLECTIC_H
#ifndef SUNDIALS_ARK_HARMONIC_SYMPLECTIC_H
#define SUNDIALS_ARK_HARMONIC_SYMPLECTIC_H

#include <stdio.h>
#include <stdlib.h>
Expand Down Expand Up @@ -169,4 +169,4 @@ static int check_retval(void* returnvalue, const char* funcname, int opt)
return 0;
}

#endif /* ARK_HARMONIC_SYMPLECTIC_H */
#endif /* SUNDIALS_ARK_HARMONIC_SYMPLECTIC_H */
6 changes: 3 additions & 3 deletions examples/arkode/C_serial/ark_kepler.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* Utilities for the arkode_kepler example.
* ---------------------------------------------------------------------------*/

#ifndef ARK_KEPLER_H
#define ARK_KEPLER_H
#ifndef SUNDIALS_ARK_KEPLER_H
#define SUNDIALS_ARK_KEPLER_H

#include <stdio.h>
#include <stdlib.h>
Expand Down Expand Up @@ -225,4 +225,4 @@ static int check_retval(void* returnvalue, const char* funcname, int opt)
return 0;
}

#endif /* ARK_KEPLER_H */
#endif /* SUNDIALS_ARK_KEPLER_H */
4 changes: 2 additions & 2 deletions examples/kinsol/CUDA_mpi/kin_em_mpicuda.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* SUNDIALS Copyright End
* -----------------------------------------------------------------------------*/

#ifndef KIN_EM_MPICUDA_H
#define KIN_EM_MPICUDA_H
#ifndef SUNDIALS_KIN_EM_MPICUDA_HPP
#define SUNDIALS_KIN_EM_MPICUDA_HPP

#include <algorithm>
#include <cmath>
Expand Down
4 changes: 2 additions & 2 deletions examples/kinsol/CXX_parallel/kin_em_p.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* SUNDIALS Copyright End
* -----------------------------------------------------------------------------*/

#ifndef KIN_EM_P_H
#define KIN_EM_P_H
#ifndef SUNDIALS_KIN_EM_P_HPP
#define SUNDIALS_KIN_EM_P_HPP

#include <algorithm>
#include <cmath>
Expand Down
4 changes: 2 additions & 2 deletions examples/kinsol/CXX_parallel/kin_heat2D_nonlin_p.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* SUNDIALS Copyright End
* -----------------------------------------------------------------------------*/

#ifndef KIN_HEAT2D_NONLIN_P_HPP
#define KIN_HEAT2D_NONLIN_P_HPP
#ifndef SUNDIALS_KIN_HEAT2D_NONLIN_P_HPP
#define SUNDIALS_KIN_HEAT2D_NONLIN_P_HPP

#include <cmath>
#include <cstdio>
Expand Down
4 changes: 2 additions & 2 deletions examples/kinsol/CXX_parhyp/kin_bratu2D_hypre_pfmg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* SUNDIALS Copyright End
* ---------------------------------------------------------------------------*/

#ifndef KIN_BRATU2D_NONLIN_HYPRE_PFMG_HPP
#define KIN_BRATU2D_NONLIN_HYPRE_PFMG_HPP
#ifndef SUNDIALS_KIN_BRATU2D_HYPRE_PFMG_HPP
#define SUNDIALS_KIN_BRATU2D_HYPRE_PFMG_HPP

#include <cmath>
#include <cstdio>
Expand Down
4 changes: 2 additions & 2 deletions examples/kinsol/CXX_parhyp/kin_heat2D_nonlin_hypre_pfmg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* SUNDIALS Copyright End
* ---------------------------------------------------------------------------*/

#ifndef KIN_HEAT2D_NONLIN_HYPRE_PFMG_HPP
#define KIN_HEAT2D_NONLIN_HYPRE_PFMG_HPP
#ifndef SUNDIALS_KIN_HEAT2D_NONLIN_HYPRE_PFMG_HPP
#define SUNDIALS_KIN_HEAT2D_NONLIN_HYPRE_PFMG_HPP

#include <cmath>
#include <cstdio>
Expand Down
Loading
Loading