Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into autodoc-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
KineticTheory committed Nov 14, 2018
2 parents a93342d + 5742080 commit 869c879
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 52 deletions.
2 changes: 1 addition & 1 deletion environment/bashrc/.bashrc_toss3
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ else
module load friendly-testing
module use --append ${VENDOR_DIR}-ec/modulefiles

export dracomodules="ack htop clang-format \
export dracomodules="ack htop clang-format python \
intel/18.0.2 openmpi/2.1.2 mkl \
subversion cmake/3.12.1 numdiff git totalview trilinos/12.10.1 \
superlu-dist/5.1.3 metis parmetis random123 eospac/6.3.0"
Expand Down
2 changes: 2 additions & 0 deletions regression/tt-job-launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ fi
# Note that we build on the haswell back-end (even when building code for knl):
build_partition_options="-N 1 -t 1:00:00"
test_partition_options="-N 1 -t 8:00:00 --gres=craynetwork:0"
#test_partition_options="-N 1 -t 8:00:00 --gres=craynetwork:0 --reservation kt_hw"
case $extra_params_sort_safe in
*knl*) test_partition_options="-N 1 -t 8:00:00 --gres=craynetwork:0 -p knl" ;;
# *knl*) test_partition_options="-N 1 -t 8:00:00 --gres=craynetwork:0 -p knl --reservation kt_knl" ;;
esac

# When on DST use
Expand Down
21 changes: 4 additions & 17 deletions src/units/PhysicalConstants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,18 @@
* light, etc) are defined for the local UnitSystem.
* \date Mon Nov 10 09:24:55 2003
* \note Copyright (C) 2016-2018 Los Alamos National Security, LLC.
* All rights reserved.
*/
//---------------------------------------------------------------------------//

* All rights reserved. */
//---------------------------------------------------------------------------//

#include "PhysicalConstants.hh"

#include "PhysicalConstantsSI.hh"
#include "ds++/Soft_Equivalence.hh"
#include <iomanip>
#include <iostream>

namespace rtt_units {

//----------------------------------------------------------------------------//
/*!
* \brief Default constructor provides physical constants with SI units (kg,
* m, seconds, degree K, amp, radian, mole).
Expand All @@ -39,10 +36,11 @@ PhysicalConstants::PhysicalConstants()
// empty
}

//----------------------------------------------------------------------------//
/*!
* \brief Constuctor that creates a set of PhysicalConstants using the
* provided rtt_units::UnitSystem.
* \param u A complete UnitSystem. PhysicalConstants will be formed and
* \param[in] u A complete UnitSystem. PhysicalConstants will be formed and
* returned using these units (CGS, SI, etc.)
* \return A PhysicalConstants object.
*/
Expand All @@ -64,17 +62,6 @@ PhysicalConstants::PhysicalConstants(UnitSystem const &u)
d_electronMass(electronMassSI * u.M()),
d_protonMass(protonMassSI * u.M()) {
// empty

// std::cout << std::setprecision(16) << std::scientific
// << "\nu.e() = " << u.e()
// << "\nu.t() = " << u.t()
// << "\nu.T() = " << u.T()
// << "\nu.v() = " << u.v()
// << "\nu.p() = " << u.p()
// << "\nu.L() = " << u.L()
// << "\nu.M() = " << u.M()
// << "\nu.a() = " << u.a()
// << std::endl;
}

} // end namespace rtt_units
Expand Down
12 changes: 4 additions & 8 deletions src/units/PhysicalConstants.hh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
* light, etc) are defined.
* \date Fri Nov 07 10:04:52 2003
* \note Copyright (C) 2016-2018 Los Alamos National Security, LLC.
* All rights reserved.
*/
//---------------------------------------------------------------------------//

* All rights reserved. */
//---------------------------------------------------------------------------//

#ifndef __units_PhysicalConstants_hh__
Expand All @@ -23,8 +20,8 @@ namespace rtt_units {
/*!
* \class PhysicalConstants
*
* \brief A class to define and encapsulate physical and mathematical
* constants in the current UnitSystem.
* \brief A class to define and encapsulate physical and mathematical constants
* in the current UnitSystem.
*
* \sa rtt_units::UnitSystem
* \sa rtt_units::UnitSystemType
Expand All @@ -42,14 +39,13 @@ namespace rtt_units {
* // AstroPhysics units.
* \endverbatim
*
* Example
* \example test/tstPhysicalConstants.cc
* This is the unit regression test for the PhysicalConstants class. It
* demonstrates typical usage.
*/
//==============================================================================

class DLL_PUBLIC_units PhysicalConstants {
class PhysicalConstants {
public:
// Constructors.
PhysicalConstants();
Expand Down
62 changes: 36 additions & 26 deletions src/units/PhysicalConstantsSI.hh
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,23 @@ namespace rtt_units {
// W - watts, J - joules, C - coulombs, F - farads
// mol - mole

//---------------------------------------------------------------------------//
// FUNDAMENTAL CONSTANTS
//
// NIST Reference on Constants, Units and Uncertainty
// CODATA internationally recommended values of the Fundamental Physical
// Constants, http://physics.nist.gov/cuu/Constants/
//
// The units of these fundamental constants should be factors of 10X different
// from the official NIST 2010 CODATA report data to allow for easy comparison
// between these values and the NIST data.
//
// Fundamental constants are listed first.
// Derived constants are listed second.
// Actual data is placed in a user-defined type for C-interoperatbility.
//---------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
/*!
* FUNDAMENTAL CONSTANTS
*
* NIST Reference on Constants, Units and Uncertainty CODATA internationally
* recommended values of the Fundamental Physical Constants,
* http://physics.nist.gov/cuu/Constants/
*
* The units of these fundamental constants should be factors of 10X different
* from the official NIST 2010 CODATA report data to allow for easy comparison
* between these values and the NIST data.
*
* - Fundamental constants are listed first.
* - Derived constants are listed second.
* - Actual data is placed in a user-defined type for C-interoperatbility.
*/
//----------------------------------------------------------------------------//

//! [c] SPEED OF LIGHT (M/S)
// exact value by NIST definition
Expand All @@ -55,13 +57,21 @@ static double const planckSI = 6.62606957e-34; // J s
// Wikipedia (2013-12-3) == NIST Codata 2010 (eps 9.1e-7)
static double const gasConstantSI = 8.3144621; // J/mol/K

//! [k] BOLTZMANN'S CONSTANT == R/Na (JOULES/K)
// If this changes you msut update the Enumerated Temperature Type in UnitSystemEnusm.hh!
/*!
* \brief [k] BOLTZMANN'S CONSTANT == R/Na (JOULES/K)
*
* \note If this changes you msut update the Enumerated Temperature Type in
* UnitSystemEnusm.hh!
*/
static double const boltzmannSI = 1.380648800E-23; // J K^-1

//! [e] ELECTRON CHARGE (COULOMBS)
// Wikipedia (2013-12-3) == NIST Codata 2010 (eps = 2.2e-8)
// If this changes you msut update the Enumerated Temperature Type in UnitSystemEnusm.hh!
/*!
* \brief [e] ELECTRON CHARGE (COULOMBS)
*
* Wikipedia (2013-12-3) == NIST Codata 2010 (eps = 2.2e-8)
* \note If this changes you msut update the Enumerated Temperature Type in
* UnitSystemEnusm.hh!
*/
static double const electronChargeSI = 1.602176565e-19; // Amp / sec

//! [me] ELECTRON REST MASS (KG) s
Expand Down Expand Up @@ -91,8 +101,8 @@ static double const protonMassSI = 1.672621777e-27; // kg
*
* (TEMPERATURE IN eV) * EV2K = (TEMPERATURE IN KELVIN)
*
* If this number is changed, you must also update the conversion factor found
* in UniSystemUnums.hh.
* \note If this number is changed, you must also update the conversion factor
* found in UniSystemUnums.hh.
*/
static double const EV2K = electronChargeSI / boltzmannSI;

Expand All @@ -105,8 +115,8 @@ static double const EV2K = electronChargeSI / boltzmannSI;
* \f]
*/
static double const stefanBoltzmannSI =
static_cast<double>(2.0) * std::pow(PI, 5) * std::pow(boltzmannSI, 4) /
(static_cast<double>(15.0) * std::pow(planckSI, 3) * std::pow(cLightSI, 2));
2.0 * std::pow(PI, 5) * std::pow(boltzmannSI, 4) /
(15.0 * std::pow(planckSI, 3) * std::pow(cLightSI, 2));

//! [F] Faraday constant == Na * e
static double const faradayConstantSI = AVOGADRO * electronChargeSI;
Expand All @@ -127,6 +137,6 @@ static double const classicalElectronRadiusSI =

#endif // __units_PhysicalConstantsSI_hh__

//---------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
// end of units/PhysicalConstantsSI.hh
//---------------------------------------------------------------------------//
//----------------------------------------------------------------------------//

0 comments on commit 869c879

Please sign in to comment.