diff --git a/.gitignore b/.gitignore index ff145fc654e563ee323b9bf9948efaf24dcb1a8b..0ce9d1bd5bac696f0d8d24b4fb7f2cc4d5c52c9d 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,9 @@ classic/5.0/src/Construction/cmake_install.cmake classic/5.0/src/Fields/CMakeFiles classic/5.0/src/Fields/Makefile classic/5.0/src/Fields/cmake_install.cmake +classic/5.0/src/Fields/Interpolation/CMakeFiles +classic/5.0/src/Fields/Interpolation/Makefile +classic/5.0/src/Fields/Interpolation/cmake_install.cmake classic/5.0/src/Filters/CMakeFiles classic/5.0/src/Filters/Makefile classic/5.0/src/Filters/cmake_install.cmake @@ -57,6 +60,7 @@ classic/5.0/src/Utilities/Makefile classic/5.0/src/Utilities/cmake_install.cmake classic/5.0/src/cmake_install.cmake classic/5.0/src/config.h +classic/5.0/src/libCLASSIC.a /cmake_install.cmake src/AbstractObjects/CMakeFiles src/AbstractObjects/Makefile @@ -137,3 +141,4 @@ src/unit_tests/gtest/include/ src/unit_tests/gtest/lib/ src/unit_tests/gtest/src/ + diff --git a/classic/5.0/src/CMakeLists.txt b/classic/5.0/src/CMakeLists.txt index 314027fc8f4bf49a9dff26cab21d83786f9714d5..ddded2b5a961bbeee31ad3935a9a8c8141d19f8b 100644 --- a/classic/5.0/src/CMakeLists.txt +++ b/classic/5.0/src/CMakeLists.txt @@ -43,7 +43,6 @@ add_subdirectory(Beamlines) add_subdirectory(Channels) add_subdirectory(ComponentWrappers) add_subdirectory(Construction) -add_subdirectory(Fields/SectorMagneticFieldMap) add_subdirectory(Fields) add_subdirectory(Filters) add_subdirectory(FixedAlgebra) @@ -67,4 +66,4 @@ include_directories ( add_library( CLASSIC ${CLASSIC_SRCS} ) install (TARGETS CLASSIC DESTINATION "${CMAKE_INSTALL_PREFIX}/lib") -install (FILES Utilities/ClassicException.h DESTINATION "${CMAKE_INSTALL_PREFIX}/include/Utilities") \ No newline at end of file +install (FILES Utilities/ClassicException.h DESTINATION "${CMAKE_INSTALL_PREFIX}/include/Utilities") diff --git a/classic/5.0/src/Fields/Interpolation/Makefile b/classic/5.0/src/Fields/Interpolation/Makefile deleted file mode 100644 index ece7233be9ee9c26f4d8b65e0bbf4821068aa133..0000000000000000000000000000000000000000 --- a/classic/5.0/src/Fields/Interpolation/Makefile +++ /dev/null @@ -1,156 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 2.8 - -# Default target executed when no arguments are given to make. -default_target: all -.PHONY : default_target - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - -# A target that is always out of date. -cmake_force: -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /usr/bin/cmake - -# The command to remove a file. -RM = /usr/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = /home/cr67/OPAL/source/opal_git - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = /home/cr67/OPAL/source/opal_git - -#============================================================================= -# Targets provided globally by CMake. - -# Special rule for the target edit_cache -edit_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..." - /usr/bin/cmake -i . -.PHONY : edit_cache - -# Special rule for the target edit_cache -edit_cache/fast: edit_cache -.PHONY : edit_cache/fast - -# Special rule for the target install -install: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." - /usr/bin/cmake -P cmake_install.cmake -.PHONY : install - -# Special rule for the target install -install/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." - /usr/bin/cmake -P cmake_install.cmake -.PHONY : install/fast - -# Special rule for the target install/local -install/local: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." - /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake -.PHONY : install/local - -# Special rule for the target install/local -install/local/fast: install/local -.PHONY : install/local/fast - -# Special rule for the target list_install_components -list_install_components: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" -.PHONY : list_install_components - -# Special rule for the target list_install_components -list_install_components/fast: list_install_components -.PHONY : list_install_components/fast - -# Special rule for the target rebuild_cache -rebuild_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." - /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : rebuild_cache - -# Special rule for the target rebuild_cache -rebuild_cache/fast: rebuild_cache -.PHONY : rebuild_cache/fast - -# The main all target -all: cmake_check_build_system - cd /home/cr67/OPAL/source/opal_git && $(CMAKE_COMMAND) -E cmake_progress_start /home/cr67/OPAL/source/opal_git/CMakeFiles /home/cr67/OPAL/source/opal_git/classic/5.0/src/Fields/Interpolation/CMakeFiles/progress.marks - cd /home/cr67/OPAL/source/opal_git && $(MAKE) -f CMakeFiles/Makefile2 classic/5.0/src/Fields/Interpolation/all - $(CMAKE_COMMAND) -E cmake_progress_start /home/cr67/OPAL/source/opal_git/CMakeFiles 0 -.PHONY : all - -# The main clean target -clean: - cd /home/cr67/OPAL/source/opal_git && $(MAKE) -f CMakeFiles/Makefile2 classic/5.0/src/Fields/Interpolation/clean -.PHONY : clean - -# The main clean target -clean/fast: clean -.PHONY : clean/fast - -# Prepare targets for installation. -preinstall: all - cd /home/cr67/OPAL/source/opal_git && $(MAKE) -f CMakeFiles/Makefile2 classic/5.0/src/Fields/Interpolation/preinstall -.PHONY : preinstall - -# Prepare targets for installation. -preinstall/fast: - cd /home/cr67/OPAL/source/opal_git && $(MAKE) -f CMakeFiles/Makefile2 classic/5.0/src/Fields/Interpolation/preinstall -.PHONY : preinstall/fast - -# clear depends -depend: - cd /home/cr67/OPAL/source/opal_git && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 -.PHONY : depend - -# Help Target -help: - @echo "The following are some of the valid targets for this Makefile:" - @echo "... all (the default if no target is provided)" - @echo "... clean" - @echo "... depend" - @echo "... edit_cache" - @echo "... install" - @echo "... install/local" - @echo "... list_install_components" - @echo "... rebuild_cache" -.PHONY : help - - - -#============================================================================= -# Special targets to cleanup operation of make. - -# Special rule to run CMake to check the build system integrity. -# No rule that depends on this can have commands that come from listfiles -# because they might be regenerated. -cmake_check_build_system: - cd /home/cr67/OPAL/source/opal_git && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 -.PHONY : cmake_check_build_system - diff --git a/classic/5.0/src/Fields/Interpolation/PolynomialPatch.cpp b/classic/5.0/src/Fields/Interpolation/PolynomialPatch.cpp index 5600e6c56f937a3f249fb3f756f4d66cfa2f02a2..fbba2a951ee69d69c6b51a0c665c6226fc7b0f02 100644 --- a/classic/5.0/src/Fields/Interpolation/PolynomialPatch.cpp +++ b/classic/5.0/src/Fields/Interpolation/PolynomialPatch.cpp @@ -59,7 +59,7 @@ PolynomialPatch::PolynomialPatch(Mesh* grid_points, ); } point_dimension_ = grid_points_->getPositionDimension(); - if (validity_region_->getPositionDimension() != point_dimension_) { + if (validity_region_->getPositionDimension() != int(point_dimension_)) { throw GeneralClassicException( "PolynomialPatch::PolynomialPatch", "PolynomialPatch validity_region_ has bad dimension"); diff --git a/classic/5.0/src/Fields/Interpolation/SolveFactory.cpp b/classic/5.0/src/Fields/Interpolation/SolveFactory.cpp index 85249619ca9fc0f60d6edda02d99c28da226ef9e..9ef5e2a4f650248f790fd6d20d7685e032e9495f 100644 --- a/classic/5.0/src/Fields/Interpolation/SolveFactory.cpp +++ b/classic/5.0/src/Fields/Interpolation/SolveFactory.cpp @@ -62,7 +62,7 @@ void SolveFactory::BuildHInvMatrix( h_inv_(i+1, j+1) = poly_vec[j]; } } - for (int i = 0; i < deriv_positions.size(); ++i) { + for (size_t i = 0; i < deriv_positions.size(); ++i) { std::vector<double> deriv_vec = MakeSquareDerivVector(deriv_positions[i], deriv_indices[i]); for (int j = 0; j < n_poly_coeffs_; ++j) { @@ -133,7 +133,6 @@ SquarePolynomialVector* SolveFactory::PolynomialSolve( "Values and derivatives over or under constrained" ); } - int pointDim = square_temp_.PointDimension(); int valueDim = 0; if (values.size() != 0) { valueDim = values[0].size(); diff --git a/classic/5.0/src/Fields/Interpolation/polynomial_solve_with_smoothing.aux b/classic/5.0/src/Fields/Interpolation/polynomial_solve_with_smoothing.aux deleted file mode 100644 index 8428308c1faa71561f930384a388cbfccac2dc8f..0000000000000000000000000000000000000000 --- a/classic/5.0/src/Fields/Interpolation/polynomial_solve_with_smoothing.aux +++ /dev/null @@ -1,6 +0,0 @@ -\relax -\@writefile{toc}{\contentsline {section}{\numberline {1}Arbitrary Order, Arbitrary Dimensional Polynomial Solve With Smoothing}{1}} -\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Generalised Indexing and Notation}{1}} -\newlabel{eq:quadratic}{{1}{1}} -\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}Polynomial Solve with no Smoothing}{2}} -\@writefile{toc}{\contentsline {subsection}{\numberline {1.3}Polynomial Solve with Smoothing}{2}} diff --git a/classic/5.0/src/Fields/Interpolation/polynomial_solve_with_smoothing.log b/classic/5.0/src/Fields/Interpolation/polynomial_solve_with_smoothing.log deleted file mode 100644 index c203c5ea84bf6941128b032857870c27d35d0a57..0000000000000000000000000000000000000000 --- a/classic/5.0/src/Fields/Interpolation/polynomial_solve_with_smoothing.log +++ /dev/null @@ -1,173 +0,0 @@ -This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) (format=pdflatex 2014.9.17) 1 MAY 2015 17:54 -entering extended mode - restricted \write18 enabled. - %&-line parsing enabled. -**polynomial_solve_with_smoothing.tex -(./polynomial_solve_with_smoothing.tex -LaTeX2e <2011/06/27> -Babel <3.9h> and hyphenation patterns for 2 languages loaded. -(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls -Document Class: article 2007/10/19 v1.4h Standard LaTeX document class -(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo -File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option) -) -\c@part=\count79 -\c@section=\count80 -\c@subsection=\count81 -\c@subsubsection=\count82 -\c@paragraph=\count83 -\c@subparagraph=\count84 -\c@figure=\count85 -\c@table=\count86 -\abovecaptionskip=\skip41 -\belowcaptionskip=\skip42 -\bibindent=\dimen102 -) -(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty -Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR) - -(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty -Package: keyval 1999/03/16 v1.13 key=value parser (DPC) -\KV@toks@=\toks14 -) -(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty -Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR) - -(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty -Package: trig 1999/03/16 v1.09 sin cos tan (DPC) -) -(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg -File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live -) -Package graphics Info: Driver file: pdftex.def on input line 91. - -(/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def -File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX - -(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty -Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO) -) -(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty -Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO) -) -\Gread@gobject=\count87 -)) -\Gin@req@height=\dimen103 -\Gin@req@width=\dimen104 -) -(./polynomial_solve_with_smoothing.aux) -\openout1 = `polynomial_solve_with_smoothing.aux'. - -LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 4. -LaTeX Font Info: ... okay on input line 4. -LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 4. -LaTeX Font Info: ... okay on input line 4. -LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 4. -LaTeX Font Info: ... okay on input line 4. -LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 4. -LaTeX Font Info: ... okay on input line 4. -LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 4. -LaTeX Font Info: ... okay on input line 4. -LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 4. -LaTeX Font Info: ... okay on input line 4. - -(/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii -[Loading MPS to PDF converter (version 2006.09.02).] -\scratchcounter=\count88 -\scratchdimen=\dimen105 -\scratchbox=\box26 -\nofMPsegments=\count89 -\nofMParguments=\count90 -\everyMPshowfont=\toks15 -\MPscratchCnt=\count91 -\MPscratchDim=\dimen106 -\MPnumerator=\count92 -\makeMPintoPDFobject=\count93 -\everyMPtoPDFconversion=\toks16 -) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty -Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO -) - -(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty -Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO) -Package ifluatex Info: LuaTeX not detected. -) -(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty -Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO) -Package ifpdf Info: pdfTeX in PDF mode is detected. -) -Package pdftexcmds Info: LuaTeX not detected. -Package pdftexcmds Info: \pdf@primitive is available. -Package pdftexcmds Info: \pdf@ifprimitive is available. -Package pdftexcmds Info: \pdfdraftmode found. -) -(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty -Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf - -(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty -Package: grfext 2010/08/19 v1.1 Manage graphics extensions (HO) - -(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty -Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO) -)) -(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty -Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO) - -(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty -Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO) - -(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty -Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO) -Package etexcmds Info: Could not find \expanded. -(etexcmds) That can mean that you are not using pdfTeX 1.50 or -(etexcmds) that some package has redefined \expanded. -(etexcmds) In the latter case, load this package earlier. -))) -Package grfext Info: Graphics extension search list: -(grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE -G,.JBIG2,.JB2,.eps] -(grfext) \AppendGraphicsExtensions on input line 452. - -(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg -File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv -e -)) -Overfull \hbox (1.308pt too wide) in paragraph at lines 6--6 -[]\OT1/cmr/bx/n/14.4 Arbitrary Or-der, Ar-bi-trary Di-men-sional Poly- - [] - -LaTeX Font Info: External font `cmex10' loaded for size -(Font) <7> on input line 19. -LaTeX Font Info: External font `cmex10' loaded for size -(Font) <5> on input line 19. -[1 - -{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2] -(./polynomial_solve_with_smoothing.aux) ) -Here is how much of TeX's memory you used: - 1473 strings out of 495028 - 21242 string characters out of 6181497 - 77159 words of memory out of 5000000 - 4699 multiletter control sequences out of 15000+600000 - 6123 words of font info for 22 fonts, out of 8000000 for 9000 - 14 hyphenation exceptions out of 8191 - 37i,5n,23p,257b,115s stack positions out of 5000i,500n,10000p,200000b,80000s -</usr/share/texlive/texmf-dist/fonts/t -ype1/public/amsfonts/cm/cmbx10.pfb></usr/share/texlive/texmf-dist/fonts/type1/p -ublic/amsfonts/cm/cmbx12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/ -amsfonts/cm/cmex10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfon -ts/cm/cmmi10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/ -cmmi5.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi7.p -fb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></us -r/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr5.pfb></usr/share/ -texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb></usr/share/texlive/ -texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/share/texlive/texmf- -dist/fonts/type1/public/amsfonts/cm/cmsy7.pfb></usr/share/texlive/texmf-dist/fo -nts/type1/public/amsfonts/cm/cmti10.pfb> -Output written on polynomial_solve_with_smoothing.pdf (2 pages, 124220 bytes). -PDF statistics: - 59 PDF objects out of 1000 (max. 8388607) - 42 compressed objects within 1 object stream - 0 named destinations out of 1000 (max. 500000) - 1 words of extra memory for PDF output out of 10000 (max. 10000000) - diff --git a/classic/5.0/src/Fields/Interpolation/polynomial_solve_with_smoothing.pdf b/classic/5.0/src/Fields/Interpolation/polynomial_solve_with_smoothing.pdf deleted file mode 100644 index 28c5ad17a31dcc2c69ef5bf4749685aa97c29351..0000000000000000000000000000000000000000 Binary files a/classic/5.0/src/Fields/Interpolation/polynomial_solve_with_smoothing.pdf and /dev/null differ diff --git a/classic/5.0/src/Fields/SectorMagneticFieldMap.cpp b/classic/5.0/src/Fields/SectorMagneticFieldMap.cpp index dfb1201f484079ba87969b9bc581faf32d09783b..ded5d45be8fd61a076300b0cd0bf8b029e7581c2 100644 --- a/classic/5.0/src/Fields/SectorMagneticFieldMap.cpp +++ b/classic/5.0/src/Fields/SectorMagneticFieldMap.cpp @@ -117,8 +117,6 @@ void SectorMagneticFieldMap::setInterpolator(VectorMap* interpolator) { } interpolator_m = interpolator; if (interpolator_m != NULL) { - ThreeDGrid* fp_grid = dynamic_cast<ThreeDGrid*>(interpolator_m->getMesh()); - if (interpolator_m->getPointDimension() != 3) throw(LogicalError( "SectorMagneticFieldMap::setInterpolator", @@ -135,13 +133,11 @@ void SectorMagneticFieldMap::setInterpolator(VectorMap* interpolator) { "SectorMagneticFieldMap::setInterpolator", "Attempt to load interpolator with grid not ThreeDGrid" )); - double phiTol = (grid->maxZ()-grid->minZ())*fractionalBBPhiTolerance_m; SectorField::setPolarBoundingBox (grid->minX(), grid->minY()-grid->maxY(), grid->minZ(), grid->maxX(), grid->maxY(), grid->maxZ(), 0., 0., 0.); } - Mesh* mesh = interpolator_m->getMesh(); print(std::cerr); }