From cb4eaa546674aa449df69b7a5bb6f83b84119111 Mon Sep 17 00:00:00 2001 From: Jochem Snuverink Date: Fri, 25 Sep 2020 11:02:44 +0200 Subject: [PATCH] spelling fixes and add some comments --- CMakeLists.txt | 3 ++- CMakeModules/FindGTest.cmake | 4 ---- src/Classic/AbsBeamline/RFCavity.cpp | 2 +- src/Classic/AbsBeamline/TravelingWave.h | 4 ++-- src/Classic/Algorithms/Tracker.h | 8 ++++---- .../Fields/Interpolation/PPSolveFactory.h | 2 +- src/Elements/OpalFlexibleCollimator.cpp | 2 +- src/Elements/OpalPepperPot.cpp | 4 ++-- src/Expressions/SDeferred.h | 4 ++-- src/Expressions/SRefAttr.h | 2 +- src/Lines/SequenceMember.h | 2 +- src/Solvers/BoxCornerDomain.h | 5 ++--- src/Structure/FieldSolver.cpp | 16 ++++++++-------- src/Track/TrackEnd.cpp | 2 +- tools/README | 5 ++++- 15 files changed, 32 insertions(+), 33 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b64f7beef..3e07e1ea1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,6 +41,7 @@ set (CMAKE_CXX_STANDARD 11) set (CMAKE_CXX_STANDARD_REQUIRED ON) set (CMAKE_CXX_EXTENSIONS OFF) +# Disable compile time assert (used by IPPL) add_definitions (-DNOCTAssert) add_compile_options (-Wall) @@ -171,7 +172,7 @@ if (ENABLE_AMR) endif () option (ENABLE_AMR_MG_SOLVER "Enable AMR MG solver" OFF) -option (ENABLE_SAAMG_SOLVER "Enable iteartive SA-AMG-PCG self field solver" OFF) +option (ENABLE_SAAMG_SOLVER "Enable iterative SA-AMG-PCG self field solver" OFF) if (ENABLE_SAAMG_SOLVER OR ENABLE_AMR_MG_SOLVER) # # :FIXME: We have to add checks whether the required Trilinos modules diff --git a/CMakeModules/FindGTest.cmake b/CMakeModules/FindGTest.cmake index 371778229..d8ad2823e 100644 --- a/CMakeModules/FindGTest.cmake +++ b/CMakeModules/FindGTest.cmake @@ -1,10 +1,6 @@ # # Find gtest Google Test includes and library # -# gtest -# It can be found at: -# http://amas.web.psi.ch/tools/GSL/index.html -# # GTEST_INCLUDE_DIR - where to find gtest/gtest.h # GTEST_LIBRARY - libgtest.a path # GTEST_MAIN_LIBRARY - libgtest_main.a path diff --git a/src/Classic/AbsBeamline/RFCavity.cpp b/src/Classic/AbsBeamline/RFCavity.cpp index b07b73f4a..52cbb2c87 100644 --- a/src/Classic/AbsBeamline/RFCavity.cpp +++ b/src/Classic/AbsBeamline/RFCavity.cpp @@ -180,7 +180,7 @@ void RFCavity::initialise(PartBunchBase *bunch, double &startField, d fieldmap_m->getFieldDimensions(startField_m, endField); if (endField <= startField_m) { throw GeneralClassicException("RFCavity::initialise", - "The length of the field map '" + filename_m + "' is zero or negativ"); + "The length of the field map '" + filename_m + "' is zero or negative"); } msg << level2 << getName() << " using file "; diff --git a/src/Classic/AbsBeamline/TravelingWave.h b/src/Classic/AbsBeamline/TravelingWave.h index e82e9ea67..ab6c4f4a2 100644 --- a/src/Classic/AbsBeamline/TravelingWave.h +++ b/src/Classic/AbsBeamline/TravelingWave.h @@ -30,8 +30,8 @@ class Fieldmap; // Class TravelingWave // ------------------------------------------------------------------------ -/// Interface for RF cavity. -// Class TravelingWave defines the abstract interface for RF cavities. +/// Interface for Traveling Wave. +// Class TravelingWave defines the abstract interface for Traveling Wave. class TravelingWave: public RFCavity { diff --git a/src/Classic/Algorithms/Tracker.h b/src/Classic/Algorithms/Tracker.h index c2d9408f2..faba8cf63 100644 --- a/src/Classic/Algorithms/Tracker.h +++ b/src/Classic/Algorithms/Tracker.h @@ -81,8 +81,8 @@ public: // The beam line to be tracked is [b]bl[/b]. // The particle reference data are taken from [b]data[/b]. // The particle bunch is initially empty. - // If [b]revBeam[/b] is true, the beam runs from s = C to s = 0. - // If [b]revTrack[/b] is true, we track against the beam. + // If [b]backBeam[/b] is true, the beam runs from s = C to s = 0. + // If [b]backTrack[/b] is true, we track against the beam. Tracker(const Beamline &, const PartData &, bool backBeam, bool backTrack); @@ -90,8 +90,8 @@ public: // The beam line to be tracked is [b]bl[/b]. // The particle reference data are taken from [b]data[/b]. // The particle bunch is taken from [b]bunch[/b]. - // If [b]revBeam[/b] is true, the beam runs from s = C to s = 0. - // If [b]revTrack[/b] is true, we track against the beam. + // If [b]backBeam[/b] is true, the beam runs from s = C to s = 0. + // If [b]backTrack[/b] is true, we track against the beam. Tracker(const Beamline &, PartBunchBase *bunch, const PartData &, bool backBeam, bool backTrack); diff --git a/src/Classic/Fields/Interpolation/PPSolveFactory.h b/src/Classic/Fields/Interpolation/PPSolveFactory.h index 87531e0f1..3f67f4096 100644 --- a/src/Classic/Fields/Interpolation/PPSolveFactory.h +++ b/src/Classic/Fields/Interpolation/PPSolveFactory.h @@ -122,7 +122,7 @@ class PPSolveFactory { void getDerivPoints(); void getDerivs(Mesh::Iterator it); - // nothing calls this method but I don't quite field brave enought to remove + // nothing calls this method but I don't quite feel brave enough to remove // it... std::vector outOfBoundsPosition(Mesh::Iterator outOfBoundsIt); static void nearbyPointsRecursive( diff --git a/src/Elements/OpalFlexibleCollimator.cpp b/src/Elements/OpalFlexibleCollimator.cpp index 00c71d680..0f3bbf70d 100644 --- a/src/Elements/OpalFlexibleCollimator.cpp +++ b/src/Elements/OpalFlexibleCollimator.cpp @@ -25,7 +25,7 @@ OpalFlexibleCollimator::OpalFlexibleCollimator(): OpalElement(SIZE, "FLEXIBLECOLLIMATOR", - "The \"FLEXIBLECOLLIMATOR\" element defines a slit."), + "The \"FLEXIBLECOLLIMATOR\" element defines a flexible collimator."), partMatInt_m(NULL) { itsAttr[FNAME] = Attributes::makeString ("FNAME", "File name containing description of holes"); diff --git a/src/Elements/OpalPepperPot.cpp b/src/Elements/OpalPepperPot.cpp index 29177e0b5..4cdd1b197 100644 --- a/src/Elements/OpalPepperPot.cpp +++ b/src/Elements/OpalPepperPot.cpp @@ -1,7 +1,7 @@ // // Class OpalPepperPot // The PEPPERPOT element. -// The class of OPAL elliptic collimators. +// The class of OPAL pepperpot collimators. // // Copyright (c) 200x - 2020, Paul Scherrer Institut, Villigen PSI, Switzerland // All rights reserved @@ -24,7 +24,7 @@ OpalPepperPot::OpalPepperPot(): OpalElement(SIZE, "PEPPERPOT", - "The \"PEPPERPOT\" element defines an elliptic collimator."), + "The \"PEPPERPOT\" element defines an pepperpot collimator."), parmatint_m(NULL) { itsAttr[XSIZE] = Attributes::makeReal ("XSIZE", "Size in x of the pepperpot in m"); diff --git a/src/Expressions/SDeferred.h b/src/Expressions/SDeferred.h index 1bc8db0d8..ee8c324f0 100644 --- a/src/Expressions/SDeferred.h +++ b/src/Expressions/SDeferred.h @@ -125,12 +125,12 @@ namespace Expressions { this->getImage() + "\": " + ex.what()); } catch(std::exception &ex) { in_evaluation = false; - throw LogicalError("ADeferred::evaluate()", + throw LogicalError("SDeferred::evaluate()", "Standard C++ exception while evaluating \"" + this->getImage() + "\": " + ex.what()); } catch(...) { in_evaluation = false; - throw LogicalError("ADeferred::evaluate()", + throw LogicalError("SDeferred::evaluate()", "Unknown exception while evaluating \"" + this->getImage() + "\": "); } diff --git a/src/Expressions/SRefAttr.h b/src/Expressions/SRefAttr.h index 7c601258a..c32e5d7ef 100644 --- a/src/Expressions/SRefAttr.h +++ b/src/Expressions/SRefAttr.h @@ -174,7 +174,7 @@ namespace Expressions { template double SRefAttr::getReal() { - throw ParseError("SValue::getReal()", + throw ParseError("SRefAttr::getReal()", "Attribute is not of real type."); } diff --git a/src/Lines/SequenceMember.h b/src/Lines/SequenceMember.h index a8f4d38c0..837e2b98a 100644 --- a/src/Lines/SequenceMember.h +++ b/src/Lines/SequenceMember.h @@ -71,7 +71,7 @@ public: MemberType itsType; // ada 4.5 2000 to speed up matching, add a pointer to - // opal elements in order to avoid serching the opal elements + // opal elements in order to avoid searching the opal elements Pointer OpalElement; diff --git a/src/Solvers/BoxCornerDomain.h b/src/Solvers/BoxCornerDomain.h index 1bc097033..227c47fcb 100644 --- a/src/Solvers/BoxCornerDomain.h +++ b/src/Solvers/BoxCornerDomain.h @@ -34,8 +34,7 @@ /* - A and B are the half apperture of the box - + A and B are the half aperture of the box / (A,B) / @@ -85,7 +84,7 @@ public: std::string interpl); ~BoxCornerDomain(); - /// as a function of z, determine the hight (B) of the geometry + /// as a function of z, determine the height (B) of the geometry inline double getB(double z) const { if((z < getZRangeMin()) || (z > getZRangeMax())) return getYRangeMax(); diff --git a/src/Structure/FieldSolver.cpp b/src/Structure/FieldSolver.cpp index c5c90e2e9..88fe719e7 100644 --- a/src/Structure/FieldSolver.cpp +++ b/src/Structure/FieldSolver.cpp @@ -73,10 +73,10 @@ namespace { // FOR FFT BASED SOLVER MX, // mesh sixe in x MY, // mesh sixe in y - MT, // mesh sixe in z - PARFFTX, // parallelized grind in x - PARFFTY, // parallelized grind in y - PARFFTT, // parallelized grind in z + MT, // mesh sixe in z + PARFFTX, // parallelized grid in x + PARFFTY, // parallelized grid in y + PARFFTT, // parallelized grid in z BCFFTX, // boundary condition in x [FFT + AMR_MG only] BCFFTY, // boundary condition in y [FFT + AMR_MG only] BCFFTZ, // boundary condition in z [FFT + AMR_MG only] @@ -248,15 +248,15 @@ FieldSolver::FieldSolver(): 16); itsAttr[AMR_BFX] = Attributes::makeReal("AMR_BFX", - "Blocking factor in x for AMR (AMR_MAXGRIDX needs to be a multiple", + "Blocking factor in x for AMR (AMR_MAXGRIDX needs to be a multiple)", 8); itsAttr[AMR_BFY] = Attributes::makeReal("AMR_BFY", - "Blocking factor in y for AMR (AMR_MAXGRIDY needs to be a multiple", + "Blocking factor in y for AMR (AMR_MAXGRIDY needs to be a multiple)", 8); itsAttr[AMR_BFZ] = Attributes::makeReal("AMR_BFZ", - "Blocking factor in y for AMR (AMR_MAXGRIDZ needs to be a multiple", + "Blocking factor in y for AMR (AMR_MAXGRIDZ needs to be a multiple)", 8); itsAttr[AMR_TAGGING] = Attributes::makeUpperCaseString("AMR_TAGGING", @@ -278,7 +278,7 @@ FieldSolver::FieldSolver(): itsAttr[AMR_SCALING] = Attributes::makeReal("AMR_SCALING", "Scaling value for maximum value tagging " "(only POTENTIAL / CHARGE_DENSITY / " - "MOMENTA", 0.75); + "MOMENTA)", 0.75); itsAttr[AMR_DOMAIN_RATIO] = Attributes::makeRealArray("AMR_DOMAIN_RATIO", "Box ratio of AMR computation domain. Default: [-1, 1]^3"); diff --git a/src/Track/TrackEnd.cpp b/src/Track/TrackEnd.cpp index 7eb418e3f..177c222e4 100644 --- a/src/Track/TrackEnd.cpp +++ b/src/Track/TrackEnd.cpp @@ -7,7 +7,7 @@ // ------------------------------------------------------------------------ // // Class: TrackEnd -// The class fore the OPAL ENDTRACK command. +// The class for the OPAL ENDTRACK command. // // ------------------------------------------------------------------------ // diff --git a/tools/README b/tools/README index 6dd0e6844..aca80dd56 100644 --- a/tools/README +++ b/tools/README @@ -3,4 +3,7 @@ at https://www.aps.anl.gov/Accelerator-Operations-Physics/Software#SDDS%20Source Unpack the sources, change to the directory epics/extensions/src/ and then upack the archive SDDSCMakeLists.tar.gz in this directory. Finally apply the patch SDDS.patch with the command $ patch -p1 < /path/to/patch/SDDS.patch -Now you can use cmake to compile and install the SDDS library. \ No newline at end of file +Now you can use cmake to compile and install the SDDS library. + +Comment from Christof: +These two programs (not scripts) export particle positions and momenta from HDF5 files to SDDS and from SDDS to ASCII (which then can be used to as FROMFILE distribution) \ No newline at end of file -- GitLab